Fix overzealous logging in acs scriptlet

This commit is contained in:
Raymond Hill 2023-04-23 09:28:59 -04:00
parent f6263aa468
commit 349c8ca619
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 2 additions and 2 deletions

View File

@ -202,11 +202,11 @@ function abortCurrentScript(
const e = document.currentScript; const e = document.currentScript;
if ( e instanceof HTMLScriptElement === false ) { return; } if ( e instanceof HTMLScriptElement === false ) { return; }
if ( e === thisScript ) { return; } if ( e === thisScript ) { return; }
if ( e.src !== '' && log ) { safe.uboLog(`src: ${e.src}`); }
if ( reContext.test(e.src) === false ) { return; } if ( reContext.test(e.src) === false ) { return; }
if ( log && e.src !== '' ) { safe.uboLog(`matched src: ${e.src}`); }
const scriptText = getScriptText(e); const scriptText = getScriptText(e);
if ( log ) { safe.uboLog(`script text: ${scriptText}`); }
if ( reNeedle.test(scriptText) === false ) { return; } if ( reNeedle.test(scriptText) === false ) { return; }
if ( log ) { safe.uboLog(`matched script text: ${scriptText}`); }
throw new ReferenceError(exceptionToken); throw new ReferenceError(exceptionToken);
}; };
if ( debug ) { debugger; } // jshint ignore: line if ( debug ) { debugger; } // jshint ignore: line