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

Unified Diff: popup.js

Issue 4840054052618240: Issue 1428 - Disable "Block Element" on non-HTML pages (Closed)
Patch Set: Created Sept. 25, 2014, 4:15 p.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
Index: popup.js
===================================================================
--- a/popup.js
+++ b/popup.js
@@ -33,9 +33,11 @@
{
page = pages[0];
- // Mark page as local to hide non-relevant elements
+ // Mark page as 'local' or 'nohtml' to hide non-relevant elements
if (!page || !/^https?:\/\//.test(page.url))
document.body.classList.add("local");
+ else if (!backgroundPage.htmlPages.has(page))
+ document.body.classList.add("nohtml");
// Ask content script whether clickhide is active. If so, show cancel button.
// If that isn't the case, ask background.html whether it has cached filters. If so,
« include.postload.js ('K') | « include.postload.js ('k') | skin/popup.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld