1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-09 15:46:34 +02:00

Builder BM can capture URLs with query strings

Fixes #373
This commit is contained in:
Steve Clay
2015-09-29 16:20:30 -04:00
parent 53a832fd90
commit 70c0d4b3bf

View File

@@ -5,9 +5,11 @@ javascript:(function() {
,o ,o
,home = (location + '').split('/').splice(0, 3).join('/') + '/'; ,home = (location + '').split('/').splice(0, 3).join('/') + '/';
function add(uri) { function add(uri) {
return (0 === uri.indexOf(home)) if (0 !== uri.indexOf(home)) {
&& (!/[\?&]/.test(uri)) return;
&& uris.push(escape(uri.substr(home.length))); }
uri = uri.replace(/\?.*/, '');
uris.push(escape(uri.substr(home.length)));
}; };
function sheet(ss) { function sheet(ss) {
// we must check the domain with add() before accessing ss.cssRules // we must check the domain with add() before accessing ss.cssRules