Cleared up name collision
This commit is contained in:
parent
887c8a89e9
commit
5c7ca7f860
@ -8,13 +8,13 @@ window.onload = () => {
|
|||||||
function killStickyIfMatch(result) {
|
function killStickyIfMatch(result) {
|
||||||
if (typeof result.matchingPatterns == "undefined") return;
|
if (typeof result.matchingPatterns == "undefined") return;
|
||||||
|
|
||||||
var killSticky = false;
|
var shouldKillSticky = false;
|
||||||
let matchingPatterns = result.mode == "whitelist" ?
|
let matchingPatterns = result.mode == "whitelist" ?
|
||||||
[ ".*" ] :
|
[ ".*" ] :
|
||||||
result.matchingPatterns.split("\n");
|
result.matchingPatterns.split("\n");
|
||||||
for (let pattern of matchingPatterns) {
|
for (let pattern of matchingPatterns) {
|
||||||
if (location.href.match(new RegExp(pattern))) {
|
if (location.href.match(new RegExp(pattern))) {
|
||||||
killSticky = true;
|
shouldKillSticky = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -24,10 +24,10 @@ function killStickyIfMatch(result) {
|
|||||||
[ ];
|
[ ];
|
||||||
for (let pattern of exclusionPatterns) {
|
for (let pattern of exclusionPatterns) {
|
||||||
if (location.href.match(new RegExp(pattern))) {
|
if (location.href.match(new RegExp(pattern))) {
|
||||||
killSticky = false;
|
shouldKillSticky = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!killSticky) return;
|
if (!shouldKillSticky) return;
|
||||||
killSticky();
|
killSticky();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user