mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-06-01 18:10:17 +12:00
this fixes https://github.com/gorhill/uBlock/issues/845
This commit is contained in:
parent
deecee477d
commit
93d28a8e38
|
@ -19,7 +19,6 @@
|
|||
Home: https://github.com/gorhill/uMatrix
|
||||
*/
|
||||
|
||||
/* jshint esnext: true */
|
||||
/* global sendAsyncMessage */
|
||||
|
||||
// For background page or non-background pages
|
||||
|
@ -37,7 +36,7 @@ const {Services} = Components.utils.import(
|
|||
null
|
||||
);
|
||||
|
||||
self.vAPI = self.vAPI || {};
|
||||
var vAPI = self.vAPI = self.vAPI || {};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
|
@ -75,6 +74,9 @@ vAPI.insertHTML = (function() {
|
|||
const parser = Components.classes['@mozilla.org/parserutils;1']
|
||||
.getService(Components.interfaces.nsIParserUtils);
|
||||
|
||||
// https://github.com/gorhill/uBlock/issues/845
|
||||
// Apparently dashboard pages execute with `about:blank` principal.
|
||||
|
||||
return function(node, html) {
|
||||
while ( node.firstChild ) {
|
||||
node.removeChild(node.firstChild);
|
||||
|
@ -84,7 +86,7 @@ vAPI.insertHTML = (function() {
|
|||
html,
|
||||
parser.SanitizerAllowStyle,
|
||||
false,
|
||||
Services.io.newURI(document.baseURI, null, null),
|
||||
Services.io.newURI('about:blank', null, null),
|
||||
document.documentElement
|
||||
));
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue