PluginProbe
WP-Stateless – Google Cloud Storage / 2.2.3
WP-Stateless – Google Cloud Storage v2.2.3
4.4.3 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.3.0 2.3.1 2.3.2 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.2.0 3.2.1 3.2.2 All 62 releases
wp-stateless / lib / classes / compatibility / js / shortpixel.js

shortpixel.js in WP-Stateless – Google Cloud Storage 2.2.3, at lib/classes/compatibility/js/shortpixel.js

18 lines 587 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Overriding sliderUpdate() function of shortpixel-image-optimiser\res\js\short-pixel.js
3 * We need to replace sites url with GCS url
4 */
5
6 // backing up original function
7 var _bk_sliderUpdate = sliderUpdate;
8
9 // overriding the original function
10 sliderUpdate = function sliderUpdate(id, thumb, bkThumb, percent, filename) {
11 // replacing sites url with GCS url.
12 thumb = thumb.replace(
13 _stateless_short_pixel.baseurl,
14 _stateless_short_pixel.bucketLink
15 );
16 // using original function aftr altering thumb url.
17 _bk_sliderUpdate(id, thumb, bkThumb, percent, filename);
18 };