Browse Source

do not count own inline script

pull/2/head
gorhill 10 years ago
parent
commit
3384a7614a
  1. 6
      src/js/contentscript-end.js

6
src/js/contentscript-end.js

@ -375,7 +375,7 @@ var hasInlineScript = function(nodeList, summary) {
// https://github.com/gorhill/httpswitchboard/issues/252 // https://github.com/gorhill/httpswitchboard/issues/252
// Do not count uMatrix's own script tags, they are not required // Do not count uMatrix's own script tags, they are not required
// to "unbreak" a web page // to "unbreak" a web page
if ( typeof node.id === 'string' && node.id.lastIndexOf('uMatrix-', 0) === 0 ) {
if ( typeof node.id === 'string' && ownScripts[node.id] ) {
continue; continue;
} }
text = node.textContent.trim(); text = node.textContent.trim();
@ -396,6 +396,10 @@ var hasInlineScript = function(nodeList, summary) {
} }
}; };
var ownScripts = {
'umatrix-ua-spoofer': true
};
/******************************************************************************/ /******************************************************************************/
var nodeListsAddedHandler = function(nodeLists) { var nodeListsAddedHandler = function(nodeLists) {

Loading…
Cancel
Save