From e675ccf73e2d1ed2233029cfda6c8c82916b34bc Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sun, 31 Dec 2017 21:13:46 -0500 Subject: [PATCH] fix improper reporting of internal filter in logger [Firefox] --- platform/webext/vapi-usercss.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/platform/webext/vapi-usercss.js b/platform/webext/vapi-usercss.js index b9ef068e3..10e7d371e 100644 --- a/platform/webext/vapi-usercss.js +++ b/platform/webext/vapi-usercss.js @@ -204,9 +204,16 @@ vAPI.DOMFilterer.prototype = { var out = { declarative: [] }; + var selectors; for ( var entry of this.filterset ) { - if ( all === false && entry.internal ) { continue; } - out.declarative.push([ entry.selectors, entry.declarations ]); + selectors = entry.selectors; + if ( all !== true && this.hideNodeAttr !== undefined ) { + selectors = selectors + .replace('[' + this.hideNodeAttr + ']', '') + .replace(/^,\n|^\n/, ''); + if ( selectors === '' ) { continue; } + } + out.declarative.push([ selectors, entry.declarations ]); } return out; },