aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/sitepatch-safari.js
diff options
context:
space:
mode:
authorDeathamns <deathamns@gmail.com>2014-11-04 12:32:44 +0100
committerDeathamns <deathamns@gmail.com>2014-11-09 17:41:02 +0100
commitd98a8161f9ef23992b88aa1f8c6a17eae45e7959 (patch)
treee6ab346b0aa93f1cd784814dc6a245d2b7ba19e1 /src/js/sitepatch-safari.js
parentba0b11aabe810c6d0d29b9daf9741ec758272385 (diff)
downloaduBlock-d98a8161f9ef23992b88aa1f8c6a17eae45e7959.zip
uBlock-d98a8161f9ef23992b88aa1f8c6a17eae45e7959.tar.gz
uBlock-d98a8161f9ef23992b88aa1f8c6a17eae45e7959.tar.bz2
Drop js-loader, updates from gorhill/uBlock/master
Diffstat (limited to 'src/js/sitepatch-safari.js')
-rw-r--r--src/js/sitepatch-safari.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/js/sitepatch-safari.js b/src/js/sitepatch-safari.js
index e4eee90..4c4e9f6 100644
--- a/src/js/sitepatch-safari.js
+++ b/src/js/sitepatch-safari.js
@@ -9,7 +9,7 @@ self.vAPI = self.vAPI || {};
if (/^www\.youtube(-nocookie)?\.com/.test(location.host)) {
vAPI.sitePatch = function() {
- window.addEventListener('load', function onWindowLoad() {
+ var onWindowLoad = function() {
this.removeEventListener('load', onWindowLoad, true);
var spf = this._spf_state;
@@ -19,7 +19,8 @@ if (/^www\.youtube(-nocookie)?\.com/.test(location.host)) {
window.location.href = url;
};
}
- }, true);
+ };
+ window.addEventListener('load', onWindowLoad, true);
// based on ExtendTube's ad removing solution