diff --git a/platform/safari/vapi-client.js b/platform/safari/vapi-client.js index 99811cd90209b..6a871579be830 100644 --- a/platform/safari/vapi-client.js +++ b/platform/safari/vapi-client.js @@ -50,19 +50,21 @@ if ( /^image\/|^text\/plain/.test(contentType) ) { var vAPI = self.vAPI = self.vAPI || {}; +// https://github.com/chrisaljoudi/uBlock/issues/456 +// Already injected? +if ( vAPI.sessionId ) { + return; +} + var safari; if ( typeof self.safari === 'undefined' ) { safari = self.top.safari; + // https://github.com/el1t/uBlock-Safari/issues/23 + self.safari = safari; } else { safari = self.safari; } -// https://github.com/chrisaljoudi/uBlock/issues/456 -// Already injected? -if ( vAPI.sessionId ) { - return; -} - /******************************************************************************/ vAPI.randomToken = function() {