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

Unified Diff: safari/include.youtube.js

Issue 29345734: Issue 4141 - Safari: Fixed blocking of video ads on YouTube (Closed)
Patch Set: Created June 9, 2016, 5:29 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: safari/include.youtube.js
===================================================================
--- a/safari/include.youtube.js
+++ b/safari/include.youtube.js
@@ -17,16 +17,18 @@
(function() {
if (document.domain != "www.youtube.com")
return;
var usingContentBlockerAPI = true;
try
{
+ var beforeLoadEvent = document.createEvent("Event");
Sebastian Noack 2016/06/11 20:56:34 I wonder whether we couldn't simply use ext.backgr
Sebastian Noack 2016/06/11 21:00:30 sendMessageSync() I meant.
+ beforeLoadEvent.initEvent("beforeload");
if (safari.self.tab.canLoad(beforeLoadEvent,
{category: "request",
payload: {type: "prefs.get",
key: "safariContentBlocker"}}) != true)
usingContentBlockerAPI = false;
}
catch (e)
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld