diff --git a/platform/mv3/extension/js/background.js b/platform/mv3/extension/js/background.js index bf316e925..c62f1debe 100644 --- a/platform/mv3/extension/js/background.js +++ b/platform/mv3/extension/js/background.js @@ -191,7 +191,7 @@ function onMessage(request, sender, callback) { origin: 'USER', target: { tabId, frameIds: [ frameId ] }, }).catch(reason => { - ubolErr(reason); + ubolErr(`insertCSS/${reason}`); }); return false; } @@ -203,7 +203,7 @@ function onMessage(request, sender, callback) { origin: 'USER', target: { tabId, frameIds: [ frameId ] }, }).catch(reason => { - ubolErr(reason); + ubolErr(`removeCSS/${reason}`); }); return false; } @@ -242,7 +242,7 @@ function onMessage(request, sender, callback) { target: { tabId, frameIds: [ frameId ] }, injectImmediately: true, }).catch(reason => { - ubolErr(reason); + ubolErr(`executeScript/${reason}`); }).then(( ) => { callback(); }); diff --git a/platform/mv3/extension/js/fetch.js b/platform/mv3/extension/js/fetch.js index 3c44ae102..d93f7e175 100644 --- a/platform/mv3/extension/js/fetch.js +++ b/platform/mv3/extension/js/fetch.js @@ -27,7 +27,7 @@ function fetchJSON(path) { return fetch(`${path}.json`).then(response => response.json() ).catch(reason => { - ubolErr(reason); + ubolErr(`fetchJSON/${reason}`); }); } diff --git a/platform/mv3/extension/js/filter-manager.js b/platform/mv3/extension/js/filter-manager.js index 94a41b7b2..a968bc8c1 100644 --- a/platform/mv3/extension/js/filter-manager.js +++ b/platform/mv3/extension/js/filter-manager.js @@ -85,7 +85,7 @@ export function startCustomFilters(tabId, frameId) { target: { tabId, frameIds: [ frameId ] }, injectImmediately: true, }).catch(reason => { - ubolErr(reason); + ubolErr(`startCustomFilters/${reason}`); }) } @@ -95,7 +95,7 @@ export function terminateCustomFilters(tabId, frameId) { target: { tabId, frameIds: [ frameId ] }, injectImmediately: true, }).catch(reason => { - ubolErr(reason); + ubolErr(`terminateCustomFilters/${reason}`); }) } @@ -113,7 +113,7 @@ export async function injectCustomFilters(tabId, frameId, hostname) { origin: 'USER', target: { tabId, frameIds: [ frameId ] }, }).catch(reason => { - ubolErr(reason); + ubolErr(`injectCustomFilters/insertCSS/${reason}`); }) ); } @@ -125,7 +125,7 @@ export async function injectCustomFilters(tabId, frameId, hostname) { target: { tabId, frameIds: [ frameId ] }, injectImmediately: true, }).catch(reason => { - ubolErr(reason); + ubolErr(`injectCustomFilters/executeScript/${reason}`); }) ); } diff --git a/platform/mv3/extension/js/ruleset-manager.js b/platform/mv3/extension/js/ruleset-manager.js index ee33fdfb5..b51af9c46 100644 --- a/platform/mv3/extension/js/ruleset-manager.js +++ b/platform/mv3/extension/js/ruleset-manager.js @@ -318,7 +318,7 @@ async function updateDynamicRules() { ubolLog(`Add ${addRules.length} dynamic DNR rules`); } } catch(reason) { - ubolErr(`updateDynamicRules() / ${reason}`); + ubolErr(`updateDynamicRules/${reason}`); response.error = `${reason}`; } @@ -472,7 +472,7 @@ async function updateSessionRules() { ubolLog(`Add ${addRules.length} session DNR rules`); } } catch(reason) { - ubolErr(`updateSessionRules() / ${reason}`); + ubolErr(`updateSessionRules/${reason}`); response.error = `${reason}`; } return response; @@ -667,7 +667,7 @@ async function enableRulesets(ids) { enableRulesetIds, disableRulesetIds, }).catch(reason => { - ubolErr(reason); + ubolErr(`updateEnabledRulesets/${reason}`); response.error = `${reason}`; }); @@ -684,7 +684,7 @@ async function enableRulesets(ids) { ubolLog(`Available static rule count: ${count}`); response.staticRuleCount = count; }).catch(reason => { - ubolErr(reason); + ubolErr(`getEnabledRulesets/${reason}`); }); return response; @@ -781,7 +781,7 @@ async function updateUserRules() { out.added = addRules.length; out.removed = removeRuleIds.length; } catch(reason) { - ubolErr(`updateUserRules() / ${reason}`); + ubolErr(`updateUserRules/${reason}`); out.errors.push(`${reason}`); } finally { const userRules = await getEffectiveUserRules(); diff --git a/platform/mv3/extension/js/scripting-manager.js b/platform/mv3/extension/js/scripting-manager.js index 58d7161cd..5e31eaf1f 100644 --- a/platform/mv3/extension/js/scripting-manager.js +++ b/platform/mv3/extension/js/scripting-manager.js @@ -551,7 +551,7 @@ async function registerInjectables() { await browser.scripting.unregisterContentScripts({ ids: toRemove }); localRemove('$scripting.unregisterContentScripts'); } catch(reason) { - ubolErr(reason); + ubolErr(`unregisterContentScripts/${reason}`); } } @@ -561,7 +561,7 @@ async function registerInjectables() { await browser.scripting.registerContentScripts(toAdd); localRemove('$scripting.registerContentScripts'); } catch(reason) { - ubolErr(reason); + ubolErr(`registerContentScripts/${reason}`); } }