From 3384a7614abe2fcf6c1ccff341e3a0e6c0ad6e94 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 9 May 2015 19:34:45 -0400 Subject: [PATCH] do not count own inline script --- src/js/contentscript-end.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/js/contentscript-end.js b/src/js/contentscript-end.js index 3fd6a63..161b3cb 100644 --- a/src/js/contentscript-end.js +++ b/src/js/contentscript-end.js @@ -375,7 +375,7 @@ var hasInlineScript = function(nodeList, summary) { // https://github.com/gorhill/httpswitchboard/issues/252 // Do not count uMatrix's own script tags, they are not required // 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; } text = node.textContent.trim(); @@ -396,6 +396,10 @@ var hasInlineScript = function(nodeList, summary) { } }; +var ownScripts = { + 'umatrix-ua-spoofer': true +}; + /******************************************************************************/ var nodeListsAddedHandler = function(nodeLists) {