-
Notifications
You must be signed in to change notification settings - Fork 102
Description
Discussed in #3760
Originally posted by asWichita August 17, 2025
I like my system to boot from the default state, with all the customizations applied explicitly each time. For uBlockOrigin it means that only the unpacked extension and a backup file (as saved from Settings panel) persist between boots.The simplest way to achieve this is to replace
const json = store.adminSettings;in
js/storage.jswithconst response = await fetch(browser.runtime.getURL('ublock0.txt')) || {}; const json = await response.json() || {};where
ublock0.txtis put into extension's root and is actually a symbolic link to wherever I like to keep my backup.It works great, except starting from version 1.54.0, the extension kind of freezes and doesn't populate Filter Lists panel in case the network is up but there is no access to the internet, even if Auto-update filter lists is disabled.
Of course, the culprit is the function in
js/assets.js(added exactly in version 1.54.0), preceded with this comment:// favorLocal: avoid making network requests whenever possible // favorOrigin: avoid using CDN URLs whenever possibleIf one puts
alert(contentURLs);right before
returnstatement, one sees that forpublic_suffix_list.datandublock-badliststhe extension makes a network request anyway.The simplest workaround is to comment out the
ifstatement that rearranges order of CDN URLs in that function (apparently, it doesn't always work correctly) and place lines with local assets before the network ones inassets/assets.json(just forpublic_suffix_list.datandublock-badlists).