This commit is contained in:
Raymond Hill 2018-06-01 18:41:27 -04:00
parent 2c843f6e69
commit 4a57825411
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 11 additions and 5 deletions

View File

@ -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,8 +356,11 @@ vAPI.injectScriptlet = function(doc, text) {
(doc.head || doc.documentElement).appendChild(script);
} catch (ex) {
}
if ( script && script.parentNode ) {
script.parentNode.removeChild(script);
if ( script ) {
if ( script.parentNode ) {
script.parentNode.removeChild(script);
}
script.textContent = '';
}
};

View File

@ -78,8 +78,11 @@
(d.head || d.documentElement).appendChild(script);
} catch (ex) {
}
if ( script && script.parentNode ) {
script.parentNode.removeChild(script);
if ( script ) {
if ( script.parentNode ) {
script.parentNode.removeChild(script);
}
script.textContent = '';
}
};
injectScriptlets(document);