Cleared up name collision

This commit is contained in:
Said Achmiz 2019-01-30 23:59:19 -05:00
parent 887c8a89e9
commit 5c7ca7f860

View File

@ -8,13 +8,13 @@ window.onload = () => {
function killStickyIfMatch(result) {
if (typeof result.matchingPatterns == "undefined") return;
var killSticky = false;
var shouldKillSticky = false;
let matchingPatterns = result.mode == "whitelist" ?
[ ".*" ] :
result.matchingPatterns.split("\n");
for (let pattern of matchingPatterns) {
if (location.href.match(new RegExp(pattern))) {
killSticky = true;
shouldKillSticky = true;
break;
}
}
@ -24,10 +24,10 @@ function killStickyIfMatch(result) {
[ ];
for (let pattern of exclusionPatterns) {
if (location.href.match(new RegExp(pattern))) {
killSticky = false;
shouldKillSticky = false;
break;
}
}
if (!killSticky) return;
if (!shouldKillSticky) return;
killSticky();
}