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

Unified Diff: include.preload.js

Issue 6346177440120832: Added abstraction for frames, to fix domain-based rules, whitelisting and ad counter on Safari (Closed)
Patch Set: Created Dec. 21, 2013, 7:48 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: include.preload.js
===================================================================
--- a/include.preload.js
+++ b/include.preload.js
@@ -82,7 +82,6 @@
{
type: "should-collapse",
url: url,
- documentUrl: document.URL,
mediatype: typeMap[tag]
},
@@ -110,13 +109,11 @@
document.addEventListener("error", checkCollapse, true);
document.addEventListener("load", checkCollapse, true);
- ext.backgroundPage.sendMessage(
- {
- type: "get-selectors",
- frameUrl: window.location.href
- },
- setElemhideCSSRules
- );
+ var attr = document.documentElement.getAttribute("data-adblockkey");
+ if (attr)
+ ext.backgroundPage.sendMessage({type: "add-key-exception", token: attr});
+
+ ext.backgroundPage.sendMessage({type: "get-selectors"}, setElemhideCSSRules);
}
// In Chrome 18 the document might not be initialized yet

Powered by Google App Engine
This is Rietveld