diff --git a/platform/mv3/extension/js/utils.js b/platform/mv3/extension/js/utils.js index b1a463a77..cadeaea0b 100644 --- a/platform/mv3/extension/js/utils.js +++ b/platform/mv3/extension/js/utils.js @@ -131,11 +131,22 @@ export const broadcastMessage = message => { /******************************************************************************/ const ubolLog = (...args) => { - // Do not pollute dev console in stable release. - if ( browser.runtime.id === 'ddkjiahejlhfcafbddmgiahcphecmpfh' ) { return; } + // Do not pollute dev console in stable releases. + if ( shouldLog !== true ) { return; } console.info('[uBOL]', ...args); }; +const shouldLog = (( ) => { + const { id } = browser.runtime; + // https://addons.mozilla.org/en-US/firefox/addon/ublock-origin-lite/ + if ( id === 'uBOLite@raymondhill.net' ) { return false; } + // https://chromewebstore.google.com/detail/ddkjiahejlhfcafbddmgiahcphecmpfh + if ( id === 'ddkjiahejlhfcafbddmgiahcphecmpfh' ) { return false; } + // https://microsoftedge.microsoft.com/addons/detail/cimighlppcgcoapaliogpjjdehbnofhn + if ( id === 'cimighlppcgcoapaliogpjjdehbnofhn' ) { return false; } + return true; +})(); + /******************************************************************************/ export { diff --git a/tools/make-mv3.sh b/tools/make-mv3.sh index 39b0c3879..8e155582b 100755 --- a/tools/make-mv3.sh +++ b/tools/make-mv3.sh @@ -124,6 +124,13 @@ fi echo "*** uBOLite.mv3: extension ready" echo "Extension location: $DES/" +# Local build: use a different extension id than the official one +if [ -z "$TAGNAME" ]; then + tmp=$(mktemp) + jq '.browser_specific_settings.gecko.id = "uBOLite.dev@raymondhill.net"' "$DES/manifest.json" > "$tmp" \ + && mv "$tmp" "$DES/manifest.json" +fi + if [ "$FULL" = "yes" ]; then if [ -n "$BEFORE" ]; then echo "*** uBOLite.mv3: salvaging rule ids to minimize diff size"