mirror of
https://github.com/zotero/zotero.git
synced 2026-08-28 05:25:31 +00:00
Suppress Crash Reports and RemoteSettings console spam
Some checks failed
CI / Build, Upload, Test (push) Has been cancelled
Some checks failed
CI / Build, Upload, Test (push) Has been cancelled
This commit is contained in:
parent
ba7e036582
commit
714d4416f8
1 changed files with 14 additions and 0 deletions
|
|
@ -163,6 +163,20 @@ function modify_omni {
|
|||
|
||||
# Prevent error during network requests
|
||||
replace_line 'async lazyInit\(\) \{' 'async lazyInit() { if (this.features) return false;' modules/UrlClassifierExceptionListService.sys.mjs
|
||||
|
||||
# Silence CrashManager "Could not get children of [...]/Crash Reports/events" spam
|
||||
replace_line '\/\/ Missing events folders are allowed' '\/\/ Missing events folders are allowed (silence warning)
|
||||
if (ex) return entries;' modules/CrashManager.sys.mjs
|
||||
|
||||
# Several services pull in services-settings (which we strip) and throw
|
||||
# at profile-after-change. Remove their #init() methods to prevent errors.
|
||||
replace_line 'async #init\(\) \{' 'async #init() {} async _unused_init() {' modules/EssentialDomainsRemoteSettings.sys.mjs
|
||||
replace_line 'async #init\(\) \{' 'async #init() {} async _unused_init() {' modules/SimpleURIUnknownSchemesRemoteObserver.sys.mjs
|
||||
# RemotePermissionService uses a top-level import, so even loading the
|
||||
# module throws
|
||||
replace_line 'import \{ RemoteSettings \} from "resource:\/\/services-settings\/remote-settings.sys.mjs";' \
|
||||
'const RemoteSettings = () => ({ on() {}, get: async () => [] });' \
|
||||
modules/RemotePermissionService.sys.mjs
|
||||
|
||||
replace_line 'pref\("network.captive-portal-service.enabled".+' 'pref("network.captive-portal-service.enabled", false);' greprefs.js
|
||||
replace_line 'pref\("network.connectivity-service.enabled".+' 'pref("network.connectivity-service.enabled", false);' greprefs.js
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue