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

Unified Diff: safari/ext/background.js

Issue 29340571: Issue 3687 - Add experimental support for Safari content blockers (Closed)
Patch Set: Remove onChange logic for checkboxes Created May 18, 2016, 10:43 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
Index: safari/ext/background.js
diff --git a/safari/ext/background.js b/safari/ext/background.js
index 38870c0564b31fca093a5cb0c36419a0063014a7..152ff2e1b467e0505b566ff8255051cc50d982ab 100644
--- a/safari/ext/background.js
+++ b/safari/ext/background.js
@@ -384,6 +384,7 @@
/* Message processing */
+ var dispatchedLegacyAPISupportMessage = false;
safari.application.addEventListener("message", function(event)
{
var tab = event.target;
@@ -503,6 +504,15 @@
}
tab._documentLookup[documentId] = {pageId: pageId, frameId: frameId};
+
+ if (!dispatchedLegacyAPISupportMessage)
+ {
+ ext.onMessage._dispatch({
+ type: "safari.legacyAPISupported",
+ legacyAPISupported: message.legacyAPISupported
+ });
+ dispatchedLegacyAPISupportMessage = true;
+ }
break;
case "documentId":
tab._documentLookup[message.documentId] = {

Powered by Google App Engine
This is Rietveld