Index: lib/rules.js |
=================================================================== |
--- a/lib/rules.js |
+++ b/lib/rules.js |
@@ -90,24 +90,24 @@ function getRuleFile() |
function addCustomRules() |
{ |
for (let domain in Prefs.whitelist) |
onWhitelistEntryAdded(domain); |
} |
function onWhitelistEntryAdded(domain) |
{ |
- let reverse = Array.prototype.slice.call(domain).reverse().join(""); |
+ let reverse = domain.split("").reverse().join(""); |
addSuffix(rules.domain, reverse, CUSTOM_RULE_PRIORITY); |
} |
exports.onWhitelistEntryAdded = onWhitelistEntryAdded; |
function onWhitelistEntryRemoved(domain) |
{ |
- let reverse = Array.prototype.slice.call(domain).reverse().join(""); |
+ let reverse = domain.split("").reverse().join(""); |
removeSuffix(rules.domain, reverse, CUSTOM_RULE_PRIORITY); |
} |
exports.onWhitelistEntryRemoved = onWhitelistEntryRemoved; |
function addSuffix(tree, suffix, priority) |
{ |
if (suffix.length == 0) |
{ |