1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-01 11:51:01 +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
,home = (location + '').split('/').splice(0, 3).join('/') + '/';
function add(uri) {
return (0 === uri.indexOf(home))
&& (!/[\?&]/.test(uri))
&& uris.push(escape(uri.substr(home.length)));
if (0 !== uri.indexOf(home)) {
return;
}
uri = uri.replace(/\?.*/, '');
uris.push(escape(uri.substr(home.length)));
};
function sheet(ss) {
// we must check the domain with add() before accessing ss.cssRules