Commit ab2ec1b1 authored by Dave Vandyke's avatar Dave Vandyke 🐈

Refs #24 - Properly disable whitelisting filters

parent 9995253e
Pipeline #69190995 failed with stages
in 12 minutes and 25 seconds
_root = hg:https://hg.adblockplus.org/ git:https://github.com/adblockplus/
_self = buildtools/ensure_dependencies.py
buildtools = buildtools hg:0ebf8cd23b36 git:04d50e0
adblockpluscore = adblockpluscore hg:3c40e08b7eaa git:1ea9471
adblockpluscore = adblockpluscore hg:49eab7882386 git:52efcfd
adblockplusui = adblockplusui hg:238bac6af317 git:b9a5480
......@@ -50,7 +50,7 @@ let dataCorrupted = false;
*/
function detectFirstRun()
{
firstRun = filterStorage.subscriptionCount == 0;
firstRun = filterStorage.getSubscriptionCount() == 0;
if (firstRun && (!filterStorage.firstRun || Prefs.currentVersion))
reinitialized = true;
......
......@@ -89,7 +89,7 @@ port.on("filters.whitelist", message =>
let page = new ext.Page(message.tab);
let host = page.url.hostname.replace(/^www\./, "");
let filter = Filter.fromText("@@||" + host + "^$document");
if (filter.subscriptionCount && filter.disabled)
if (filterStorage.getSubscriptionCount(filter.text) && filter.disabled)
{
filter.disabled = false;
}
......@@ -108,7 +108,7 @@ port.on("filters.unwhitelist", message =>
while (filter)
{
filterStorage.removeFilter(filter);
if (filter.subscriptionCount)
if (filterStorage.getSubscriptionCount(filter.text))
filter.disabled = true;
filter = checkWhitelisted(page);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment