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

Unified Diff: popup.js

Issue 29338764: Issue 3842 - Split up the logic updating the icon and context menu (Closed)
Patch Set: Don't revalidate when multiple filter changes occur at the same time Created March 21, 2016, 10:44 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 | « lib/whitelisting.js ('k') | no next file » | 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
@@ -23,6 +23,7 @@
var Prefs = require("prefs").Prefs;
var checkWhitelisted = require("whitelisting").checkWhitelisted;
var getDecodedHostname = require("url").getDecodedHostname;
+var isPageReady = require("filterComposer").isPageReady;
var port = require("messaging").port;
var page = null;
@@ -37,7 +38,7 @@
if (!page || (page.url.protocol != "http:" &&
page.url.protocol != "https:"))
document.body.classList.add("local");
- else if (!backgroundPage.htmlPages.has(page))
+ else if (!isPageReady(page))
document.body.classList.add("nohtml");
// Ask content script whether clickhide is active. If so, show cancel button.
« no previous file with comments | « lib/whitelisting.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld