mirror of
https://github.com/gorhill/uBlock.git
synced 2024-07-05 11:37:01 +02:00
this fixes #456: another unrelated bug unveil from previous fix
This commit is contained in:
parent
dfe82ed8dd
commit
2a7e9f8d98
|
@ -33,6 +33,13 @@
|
|||
|
||||
self.vAPI = self.vAPI || {};
|
||||
|
||||
// https://github.com/gorhill/uBlock/issues/456
|
||||
// Already injected?
|
||||
if ( vAPI.vapiClient ) {
|
||||
return;
|
||||
}
|
||||
vAPI.vapiClient = true;
|
||||
|
||||
var chrome = self.chrome;
|
||||
var vAPI = self.vAPI;
|
||||
|
||||
|
|
|
@ -33,6 +33,13 @@ if ( vAPI.canExecuteContentScript() !== true ) {
|
|||
throw "uBlock> contentscript-end.js > Skipping " + location.protocol;
|
||||
}
|
||||
|
||||
// https://github.com/gorhill/uBlock/issues/456
|
||||
// Already injected?
|
||||
if ( vAPI.contentscriptEnd ) {
|
||||
return;
|
||||
}
|
||||
vAPI.contentscriptEnd = true;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
var messager = vAPI.messaging.channel('contentscript-end.js');
|
||||
|
|
|
@ -44,6 +44,13 @@ if ( vAPI.canExecuteContentScript() !== true ) {
|
|||
return;
|
||||
}
|
||||
|
||||
// https://github.com/gorhill/uBlock/issues/456
|
||||
// Already injected?
|
||||
if ( vAPI.contentscriptStart ) {
|
||||
return;
|
||||
}
|
||||
vAPI.contentscriptStart = true;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
var localMessager = vAPI.messaging.channel('contentscript-start.js');
|
||||
|
@ -55,11 +62,6 @@ var localMessager = vAPI.messaging.channel('contentscript-start.js');
|
|||
// These can be inserted before the DOM is loaded.
|
||||
|
||||
var cosmeticFilters = function(details) {
|
||||
// Maybe uBlock's style tag was already injected?
|
||||
var style = document.getElementById('ublock-preload-1ae7a5f130fc79b4fdb8a4272d9426b5');
|
||||
if ( style !== null ) {
|
||||
return;
|
||||
}
|
||||
var donthideCosmeticFilters = {};
|
||||
var hideCosmeticFilters = {};
|
||||
style = document.createElement('style');
|
||||
|
|
Loading…
Reference in New Issue
Block a user