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

Unified Diff: include.postload.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
« background.js ('K') | « background.js ('k') | popup.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include.postload.js
===================================================================
--- a/include.postload.js
+++ b/include.postload.js
@@ -469,7 +469,7 @@
// check for that before doing stuff. |document instanceof HTMLDocument| check
// will fail on some sites like planet.mozilla.org because WebKit creates
// Document instances for XHTML documents, have to test the root element.
-if (document.documentElement instanceof HTMLElement)
+if (document instanceof HTMLDocument)
Thomas Greiner 2014/09/26 10:03:55 What about the comment above?
Sebastian Noack 2014/09/26 10:23:43 That comment is outdated. I have removed it. In fa
Thomas Greiner 2014/09/26 12:48:55 Thanks. I'll ignore the rest of the changes in the
{
// Use a contextmenu handler to save the last element the user right-clicked on.
// To make things easier, we actually save the DOM event.
@@ -631,4 +631,7 @@
break;
}
});
+
+ if (window == window.top)
+ ext.backgroundPage.sendMessage({type: "report-html-page"});
}
« background.js ('K') | « background.js ('k') | popup.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld