Index: safari/include.youtube.js |
diff --git a/safari/include.youtube.js b/safari/include.youtube.js |
index 33011d13f3050e5290b843e4f68c5ff9deeefd24..034d49cf74cbb4d5993bff67b115b975d85f821c 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) |
usingContentBlockerAPI = false; |
} |
catch (e) |