mirror of https://github.com/gorhill/uBlock.git
do not leak uBlock is in use (see comment in 21ea1a6e03
)
This commit is contained in:
parent
5406daa275
commit
337cfeb150
|
@ -208,7 +208,6 @@ var messager = vAPI.messaging.channel('contentscript-end.js');
|
||||||
var addStyleTag = function(selectors) {
|
var addStyleTag = function(selectors) {
|
||||||
hideElements(selectors);
|
hideElements(selectors);
|
||||||
var style = document.createElement('style');
|
var style = document.createElement('style');
|
||||||
style.setAttribute('class', 'ublock-postload-1ae7a5f130fc79b4fdb8a4272d9426b5');
|
|
||||||
// The linefeed before the style block is very important: do no remove!
|
// The linefeed before the style block is very important: do no remove!
|
||||||
style.appendChild(document.createTextNode(selectors.join(',\n') + '\n{display:none !important;}'));
|
style.appendChild(document.createTextNode(selectors.join(',\n') + '\n{display:none !important;}'));
|
||||||
var parent = document.body || document.documentElement;
|
var parent = document.body || document.documentElement;
|
||||||
|
|
|
@ -97,7 +97,6 @@ var cosmeticFilters = function(details) {
|
||||||
var text = hide.join(',\n');
|
var text = hide.join(',\n');
|
||||||
hideElements(text);
|
hideElements(text);
|
||||||
var style = vAPI.specificHideStyle = document.createElement('style');
|
var style = vAPI.specificHideStyle = document.createElement('style');
|
||||||
style.setAttribute('id', 'ublock-preload-1ae7a5f130fc79b4fdb8a4272d9426b5');
|
|
||||||
// The linefeed before the style block is very important: do not remove!
|
// The linefeed before the style block is very important: do not remove!
|
||||||
style.appendChild(document.createTextNode(text + '\n{display:none !important;}'));
|
style.appendChild(document.createTextNode(text + '\n{display:none !important;}'));
|
||||||
//console.debug('µBlock> "%s" cosmetic filters: injecting %d CSS rules:', details.domain, details.hide.length, hideStyleText);
|
//console.debug('µBlock> "%s" cosmetic filters: injecting %d CSS rules:', details.domain, details.hide.length, hideStyleText);
|
||||||
|
@ -116,7 +115,6 @@ var netFilters = function(details) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var style = document.createElement('style');
|
var style = document.createElement('style');
|
||||||
style.setAttribute('class', 'ublock-preload-1ae7a5f130fc79b4fdb8a4272d9426b5');
|
|
||||||
var text = details.netHide.join(',\n');
|
var text = details.netHide.join(',\n');
|
||||||
var css = details.netCollapse ?
|
var css = details.netCollapse ?
|
||||||
'\n{display:none !important;}' :
|
'\n{display:none !important;}' :
|
||||||
|
|
Loading…
Reference in New Issue