mirror of https://github.com/gorhill/uBlock.git
[mv3] Do not pollute browser console in stable release versions
This commit is contained in:
parent
4f6fa840c3
commit
02966afb8c
|
@ -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 {
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue