1
0
Fork 0
mirror of https://github.com/gorhill/uMatrix.git synced 2024-06-23 08:30:38 +12:00

do not count own inline script

This commit is contained in:
gorhill 2015-05-09 19:34:45 -04:00
parent 6bc728f8b8
commit 3384a7614a

View file

@ -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) {