PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 3.3.2
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v3.3.2
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
wp-optimize / vendor / mrclay / minify / builder / bm.js

bm.js in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance 3.3.2, at vendor/mrclay/minify/builder/bm.js

38 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 javascript:(function() {
2 var d = document
3 ,uris = []
4 ,i = 0
5 ,o
6 ,home = (location + '').split('/').splice(0, 3).join('/') + '/';
7 function add(uri) {
8 if (0 !== uri.indexOf(home)) {
9 return;
10 }
11 uri = uri.replace(/\?.*/, '');
12 uris.push(escape(uri.substr(home.length)));
13 };
14 function sheet(ss) {
15 // we must check the domain with add() before accessing ss.cssRules
16 // otherwise a security exception will be thrown
17 if (ss.href && add(ss.href) && ss.cssRules) {
18 var i = 0, r;
19 while (r = ss.cssRules[i++])
20 r.styleSheet && sheet(r.styleSheet);
21 }
22 };
23 while (o = d.getElementsByTagName('script')[i++])
24 o.src && !(o.type && /vbs/i.test(o.type)) && add(o.src);
25 i = 0;
26 while (o = d.styleSheets[i++])
27 /* http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-DocumentStyle-styleSheets
28 document.styleSheet is a list property where [0] accesses the 1st element and
29 [outOfRange] returns null. In IE, styleSheets is a function, and also throws an
30 exception when you check the out of bounds index. (sigh) */
31 sheet(o);
32 if (uris.length)
33 window.open('%BUILDER_URL%#' + uris.join(','));
34 else
35 alert('No js/css files found with URLs within "'
36 + home.split('/')[2]
37 + '".\n(This tool is limited to URLs with the same domain.)');
38 })();