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

Unified Diff: safari/include.youtube.js

Issue 29353237: Issue 4361 - Pass all parameters to initEvent (Closed)
Patch Set: Use sendMessageSync Created Sept. 16, 2016, 2:02 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
« no previous file with comments | « safari/ext/content.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: safari/include.youtube.js
diff --git a/safari/include.youtube.js b/safari/include.youtube.js
index 33011d13f3050e5290b843e4f68c5ff9deeefd24..368b8ade40a729b13ed0d1d39c8393a34e3b5d57 100644
--- a/safari/include.youtube.js
+++ b/safari/include.youtube.js
@@ -22,12 +22,8 @@
var usingContentBlockerAPI = true;
try
{
- var beforeLoadEvent = document.createEvent("Event");
- beforeLoadEvent.initEvent("beforeload");
- if (safari.self.tab.canLoad(beforeLoadEvent,
- {category: "request",
- payload: {type: "prefs.get",
- key: "safariContentBlocker"}}) != true)
+ if (ext.backgroundPage.sendMessageSync({type: "prefs.get",
+ key: "safariContentBlocker"} != true))
Sebastian Noack 2016/09/16 14:06:43 Here is a typo. You are essentially always calling
kzar 2016/09/16 14:10:36 Whoops you are right, fixed.
usingContentBlockerAPI = false;
}
catch (e)
« no previous file with comments | « safari/ext/content.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld