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: Addressed another comment Created Jan. 20, 2014, 8:50 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 | « chrome/ext/content.js ('k') | lib/basedomain.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/ext/content.js ('k') | lib/basedomain.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld