Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: popup.js

Issue 6393086494113792: Issue 154 - Added devtools panel showing blocked and blockable items (Closed)
Patch Set: Use chrome.runtime.onConnect directly Created Feb. 2, 2016, 11:19 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « metadata.safari ('k') | popupBlocker.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: popup.js
===================================================================
--- a/popup.js
+++ b/popup.js
@@ -21,7 +21,7 @@
var Filter = require("filterClasses").Filter;
var FilterStorage = require("filterStorage").FilterStorage;
var Prefs = require("prefs").Prefs;
-var isPageWhitelisted = require("whitelisting").isPageWhitelisted;
+var checkWhitelisted = require("whitelisting").checkWhitelisted;
var getDecodedHostname = require("url").getDecodedHostname;
var page = null;
@@ -45,7 +45,7 @@
// Otherwise, we are in default state.
if (page)
{
- if (isPageWhitelisted(page))
+ if (checkWhitelisted(page))
document.body.classList.add("disabled");
page.sendMessage({type: "get-clickhide-state"}, function(response)
@@ -106,13 +106,13 @@
else
{
// Remove any exception rules applying to this URL
- var filter = isPageWhitelisted(page);
+ var filter = checkWhitelisted(page);
while (filter)
{
FilterStorage.removeFilter(filter);
if (filter.subscriptions.length)
filter.disabled = true;
- filter = isPageWhitelisted(page);
+ filter = checkWhitelisted(page);
}
}
}
« no previous file with comments | « metadata.safari ('k') | popupBlocker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld