mirror of https://github.com/gorhill/uBlock.git
code review: remove scriplet js text after injection (see https://github.com/uBlockOrigin/uBlock-issues/issues/53#issuecomment-394024828)
This commit is contained in:
parent
2c843f6e69
commit
4a57825411
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************************
|
||||
|
||||
uBlock Origin - a browser extension to block requests.
|
||||
Copyright (C) 2014-2017 Raymond Hill
|
||||
Copyright (C) 2014-2018 Raymond Hill
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -356,9 +356,12 @@ vAPI.injectScriptlet = function(doc, text) {
|
|||
(doc.head || doc.documentElement).appendChild(script);
|
||||
} catch (ex) {
|
||||
}
|
||||
if ( script && script.parentNode ) {
|
||||
if ( script ) {
|
||||
if ( script.parentNode ) {
|
||||
script.parentNode.removeChild(script);
|
||||
}
|
||||
script.textContent = '';
|
||||
}
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
|
|
@ -78,9 +78,12 @@
|
|||
(d.head || d.documentElement).appendChild(script);
|
||||
} catch (ex) {
|
||||
}
|
||||
if ( script && script.parentNode ) {
|
||||
if ( script ) {
|
||||
if ( script.parentNode ) {
|
||||
script.parentNode.removeChild(script);
|
||||
}
|
||||
script.textContent = '';
|
||||
}
|
||||
};
|
||||
injectScriptlets(document);
|
||||
let processIFrame = function(iframe) {
|
||||
|
|
Loading…
Reference in New Issue