Jump to content

Extensions and custom buttons for UXP browsers - Corrections, modifications, adjustments, and special recommendations


Recommended Posts


The legacy extension uBlock Origin - Installing over an existing one or performing a clean install? - An investigation by gif_23.gifAstroSkipper 

As I already mentioned multiple times, I noticed in the past that installing an uBlock Origin update over an already existing installation didn't work properly. Therefore, I have examined both installation methods, installing over an existing one and performing a clean install, in more detail. uniforme4.gif

Prerequisites:

The untouched xpi files of the extensions uBlock Origin 1.16.4.30 and uBlock Origin 1.16.4.31b2, the browser New Moon 28.10.7a1 (32-bit) (2024-02-23), and a Windows XP computer with all internet connections blocked.

Assertion:

Installing the extension uBlock Origin 1.16.4.31b2 over an already existing installation of uBlock Origin 1.16.4.30 in New Moon 28.10.7a1 (32-bit) (2024-02-23) under Windows XP does not work properly.

Proof:

I disconnected my Windows XP computer completely from the internet. In a fresh profile of New Moon 28.10.7a1 (32-bit) (2024-02-23), I installed uBlock Origin 1.16.4.30. Here's a screenshot of the available default filter lists, taken right after installation:

u-Block-Origin-Legacy-1-16-4-30-Offline-

You can clearly see that in the "Privacy" group the "AdGuard URL Tracking Protection" filter list is provided. I marked it with a red rectangle.

Next, I simply installed the xpi file of uBlock Origin 1.16.4.31b2 over the existing installation of uBlock Origin 1.16.4.30 what we normally call updating. Here's a screenshot of the available default filter lists, taken right after this kind of updating:

u-Block-Origin-Legacy-1-16-4-31b2-Update

And what can we see? Yes, the "AdGuard URL Tracking Protection" filter list is still provided in the "Privacy" group although this filter list has been removed in uBlock Origin 1.16.4.31b2. Even a browser restart does not change this situation. In contrast, here's a screenshot of the available default filter lists, taken right after performing a clean install of uBlock Origin 1.16.4.31b2:

u-Block-Origin-Legacy-1-16-4-31b2-Clean-

In this screenshot, we can clearly see that the "AdGuard URL Tracking Protection" filter list is no longer provided in the "Privacy" group after a clean install. I marked it with a green arrow.

q.e.d.

Conclusion:

Installing over an already existing installation of the legacy extension uBlock Origin did not and does not work properly. And this issue has nothing to do with my mod. :no: Therefore, a clean install is (and was even earlier) mandatory. :whistle: And I'm pretty sure that the result of my proof can be generalised, i.e. that this statement is independent of browser and operating system version. :yes: More explanations on this matter and reasons why users of the uBlock Origin's legacy extension didn't notice this problem in the past, I will give later when time is available again. :P

Kind regards, AstroSkipper matrix.gif

Edited by AstroSkipper
Update of content
Link to comment
Share on other sites

On 2/28/2024 at 3:05 PM, AstroSkipper said:

The legacy extension uBlock Origin - Installing over an existing one or performing a clean install? - An investigation by gif_23.gifAstroSkipper 

As I already mentioned multiple times, I noticed in the past that installing an uBlock Origin update over an already existing installation didn't work properly. Therefore, I have examined both installation methods, installing over an existing one and performing a clean install, in more detail. uniforme4.gif

Prerequisites:

The untouched xpi files of the extensions uBlock Origin 1.16.4.30 and uBlock Origin 1.16.4.31b2, the browser New Moon 28.10.7a1 (32-bit) (2024-02-23), and a Windows XP computer with all internet connections blocked.

Assertion:

Installing the extension uBlock Origin 1.16.4.31b2 over an already existing installation of uBlock Origin 1.16.4.30 in New Moon 28.10.7a1 (32-bit) (2024-02-23) under Windows XP does not work properly.

Proof:

I disconnected my Windows XP computer completely from the internet. In a fresh profile of New Moon 28.10.7a1 (32-bit) (2024-02-23), I installed uBlock Origin 1.16.4.30. Here's a screenshot of the available default filter lists, taken right after installation:

u-Block-Origin-Legacy-1-16-4-30-Offline-

You can clearly see that in the "Privacy" group the "AdGuard URL Tracking Protection" filter list is provided. I marked it with a red rectangle.

Next, I simply installed the xpi file of uBlock Origin 1.16.4.31b2 over the existing installation of uBlock Origin 1.16.4.30 what we normally call updating. Here's a screenshot of the available default filter lists, taken right after this kind of updating:

u-Block-Origin-Legacy-1-16-4-31b2-Update

And what can we see? Yes, the "AdGuard URL Tracking Protection" filter list is still provided in the "Privacy" group although this filter list has been removed in uBlock Origin 1.16.4.31b2. Even a browser restart does not change this situation. In contrast, here's a screenshot of the available default filter lists, taken right after performing a clean install of uBlock Origin 1.16.4.31b2:

u-Block-Origin-Legacy-1-16-4-31b2-Clean-

In this screenshot, we can clearly see that the "AdGuard URL Tracking Protection" filter list is no longer provided in the "Privacy" group after a clean install. I marked it with a green arrow.

q.e.d.

Conclusion:

Installing over an already existing installation of the legacy extension uBlock Origin did not and does not work properly. And this issue has nothing to do with my mod. :no: Therefore, a clean install is (and was even earlier) mandatory. :whistle: And I'm pretty sure that the result of my proof can be generalised, i.e. that this statement is independent of browser and operating system version. :yes: More explanations on this matter and reasons why users of the uBlock Origin's legacy extension didn't notice this problem in the past, I will give later when time is available again. :P

Kind regards, AstroSkipper matrix.gif

This is a quotation from gorhill's wiki page about the legacy extension of uBlock Origin:

Quote

Firefox legacy

Compatible with Firefox 24-56, Pale Moon and SeaMonkey.

Download ublock0.firefox-legacy.xpi (latest release desirable).

Right-click and select "Save Link As..."

Drag and drop the previously downloaded ublock0.firefox-legacy.xpi into Firefox

With Firefox 43 and beyond, you may need to toggle the setting xpinstall.signatures.required to false in about:config.see "Add-on signing in Firefox"

Your uBlock Origin settings are kept intact even after you uninstall the addon.

On Linux, the settings are saved in a SQlite file located at ~/.mozilla/firefox/[profile name]/extension-data/ublock0.sqlite.

On Windows, the settings are saved in a SQlite file located at %APPDATA%\Mozilla\Firefox\Profiles\[profile name]\extension-data\ublock0.sqlite.

Source: https://github.com/gorhill/uBlock/tree/master/dist#install 
Drag and drop the previously downloaded ublock0.firefox-legacy.xpi into Firefox (Pale Moon, New Moon and so on) is the recommended method there for installing an uBO xpi file. Same here by JustOff:

Quote

uBlock Origin Updater has become obsolete #112

I'm pleased to announce that starting from version 1.16.4.17, uBlock Origin for Firefox legacy-based browsers can auto-update itself without any additional tricks. This also means that uBlock Origin Updater is becoming obsolete, and I'm going to make it so that it uninstalls itself on the next update.

Source: https://github.com/JustOff/ublock0-updater/issues/112 

This type of update, by simply installing over an existing installation, may have worked in the past, but unfortunately, as shown in my above-quoted proof, it hasn't worked for a long time when it comes to the default filter lists. nimportequoi.gif uBO's settings, self-created rules and self-added, custom filters remain intact as far as I noticed. But why did the users never realise this update issue in the past? scratch_one-s_head.gif The answer is quite simple. After installing or updating uBlock Origin, it automatically performs a download and installation of the internal list of all default filter lists (assets.json) quite promptly. So, a user always got the most recent version of this file from uBO's update server. Unfortunately, this file hasn't been updated for a long time and has become more and more obsolete. In my mod uBlock Origin Legacy, I therefore have removed the auto update of this file and started to maintain it by myself. That's why now a user immediately notice the issue that the new filter lists of my mod are not shown when installing an update of uBlock Origin Legacy over an existing installation and why a clean install is mandatory (and already was in the past). One thing I should still mention. When I make a recommendation that something should be done one way or another, I never do so without a specific reason. smilie_denk_24.gif

Cheers, AstroSkipper matrix.gif

Edited by AstroSkipper
Update of content
Link to comment
Share on other sites

And here is the shortest way to update the installation of uBlock Origin Legacy properly:

  • Backup all your settings using the "Back up to file" button on the page "Settings".
  • Uninstall uBlock Origin Legacy and delete the ublock0.sqlite file in your profile subfolder extension-data.
  • Restart the browser and install the new version of uBlock Origin Legacy.
  • Restore all settings from your backup file.

Greetings, AstroSkipper matrix.gif

Edited by AstroSkipper
Link to comment
Share on other sites

Posted (edited)

I found an alternative way to update uBlock Origin Legacy when the user still decides to install over an existing installation:

  • Backup all your settings using the "Back up to file" button on the page "Settings".
  • Install the new version of uBlock Origin Legacy over the existing one.
  • Reset your installation using the "Reset to default settings" button on the page "Settings".
  • Restore all settings from your backup file.

This method can only be used for updates with the same extension ID, i.e. from version 1.16.4.32 and higher or from version 1.16.4.31 and lower. The reason for this is the change of the extension ID in version 1.16.4.32 I have performed. But one thing is clear. A clean install is the best method that causes the fewest problems. :cool:

Greetings, AstroSkipper matrix.gif

Edited by AstroSkipper
Link to comment
Share on other sites

It's been some time that both Annoyances lists (AdGuard/EasyList) have been split into sub-categories. It'd be great if you could bring this to the Legacy version!

These lists are often involved in website breakage, and having sub-categories would make it easier to enable/disable unwanted stuff. Of course, I don't know if these newer sub-categories are fully compatible with Legacy. I'd expect them to, since the "main" Annoyances list I assume is the sum of all smaller sub-categories.

(I've seen references to an "Annoyances bug" in older posts, but I'm not sure what that was/is.)

Annoynaces.png

Link to comment
Share on other sites

Posted (edited)
On 2/10/2024 at 7:29 PM, AstroSkipper said:

Restart & Purge - A custom button for restarting the browser and, if necessary, purging the startup cache, created by gif_23.gifAstroSkipper

As I have already reported in @roytam1's browser thread, I have been investigating the restart behaviour of New Moon 28 and Serpent 52 (and also Mypal 68, but this is off-topic here) for some time with a focus on the startup cache. Unfortunately, I have not been able to find much useful information or documentation on this topic on the internet. Even my request in @roytam1's browser thread also went unanswered (addendum: in the meanwhile, @VistaLover has replied here. Thanks again for that! :)). It seems that detailed information or knowledge about the startup cache and how the browser restart affects this cache is practically non-existent. :dubbio: The startup cache seems to be a replacement for the former Fastload. It resides in the profile directory to store continuous chunks of data in it. In my New Moon 28 installation, without using the custom folder chrome for scripts and CSS stylesheets, only one file resides there with the name startupCache.4.little. As both, the folder and file name, contain the string startupcache, one can conclude that data is stored inside this file to accelerate the startup of the browser. Which data exactly I really don't know. nimportequoi.gif I didn't find any meaningful documentation. smilie_denk_24.gif I noticed that very often or in most cases the startup cache was cleared or reorganised automatically without any additional commands when restarting the browser. Sometimes, however, it remained unchanged after a restart. At least, I could find the code responsible for purging the startup cache:P Anyway! One thing is clear. If the data in the startup cache is corrupted, then starting problems can occur which only can be solved by deleting its content.
deletesmiley3.gif sorry.gif
This can be done, for example, manually or by the commandline option -purgecaches. But there is no button or item to start this purge of the startup cache in a convenient way from within the UXP browsers. :no: That's why I created a custom button for this purpose in JavaScript (rather a variant of JavaSript), the programming language used for creating new custom buttons by the extension Custom Buttons. I branded this custom button Restart & Purge. It performes a normal restart when left-clicked and additionally purges the startup cache when middle-clicked. After creation I have tested this custom button over a longer period of time, and it works for me as it should. :yes:
Here is a small screenshot of my custom button Restart & Purge and its tooltip taken from New Moon 28:

CB-Restart-Purge-Button-and-tooltip.png

As the code of Restart & Purge has to be initialised, you won't find it in the tab "Code" but in the tab "Initialization code" of this custom button. Here is a screenshot of its code:

CB-Restart-Purge-Code.png

I uploaded the Restart & Purge custom button as an XML file for an offline installation.
Here is the download link: https://www.mediafire.com/file/ukqrf1bak6sqbmo/Restart_%26_Purge_2-10-24__191354.xml/file https://www.mediafire.com/file/4d7pc5xyd0vcr0q/Restart_%26_Purge-ID10.xml/file (the former download link unfortunately contained a backup file which couldn't be installed)
For the installation of this button, the extension Custom Buttons is required which you can get from this post: https://msfn.org/board/topic/183923-extensions-and-custom-buttons-for-uxp-browsers-corrections-modifications-adjustments-and-special-recommendations/?do=findComment&comment=1226328
And since the legacy Custom Buttons extension runs in the UXP browsers, my custom button Restart & Purge can be used in New Moon 28, Serpent 52, Pale Moon and some other browsers.

Greetings, AstroSkipper matrix.gif

 

FYI, I uploaded again my custom button Restart & Purge but this time as an HTML file. The former download links unfortunately contained a backup file of this button which either couldn't be installed without additional editing or some characters were not transferred correctly. The problem has to do with the conversion of custom buttons into XML format, where the tool I had used did not work correctly. :crazy: But now, it should be working. :P The new download link can be found in my original article. Please, re-download the HTML installation file if you have already downloaded one of the XML files and still interested in this custom button! internet3.gif

Greetings, AstroSkipper matrix.gif

PS: It is a little strange that nobody had reported this before, even though a few downloads had already been made. :dubbio:

Edited by AstroSkipper
Update of content
Link to comment
Share on other sites

Posted (edited)
2 hours ago, Amigafever said:

It's been some time that both Annoyances lists (AdGuard/EasyList) have been split into sub-categories. It'd be great if you could bring this to the Legacy version!

These lists are often involved in website breakage, and having sub-categories would make it easier to enable/disable unwanted stuff. Of course, I don't know if these newer sub-categories are fully compatible with Legacy. I'd expect them to, since the "main" Annoyances list I assume is the sum of all smaller sub-categories.

(I've seen references to an "Annoyances bug" in older posts, but I'm not sure what that was/is.)

Annoynaces.png

@Amigafever Thanks for your interest in my mod uBlock Origin Legacy! Unfortunately, these new assets.json files of the webextension uBlock Origin are no longer compatible with the legacy extension. To implement such features in uBlock Origin Legacy is very time-consuming due to deeper code changes. Don't forget I am not the developer of uBO which is gorhill together with his team! I am just a one-man band when it comes to fixing code or creating new things. All changes I did in terms of uBlock Origin Legacy are the result of own investigations of uBO's source code. Apart from that I don’t really like this new feature. One always has to weigh the effort and the benefit of such things. I have a lot of projects, and my time is unfortunately limited. smilie_denk_24.gif

Greetings, AstroSkipper matrix.gif

Edited by AstroSkipper
Update of content
Link to comment
Share on other sites

  • 4 weeks later...
Posted (edited)

News about my mod uBlock Origin Legacy! vil2_nouvelles.gif

I have of course noticed that there is considerable interest in my mod uBlock Origin Legacy. I have therefore addressed the problem of updating an existing installation of my mod. With the upcoming release of uBlock Origin Legacy 1.16.4.34, it will then also be possible to install over an existing installation of my mod (1.16.4.34 and higher). The internal list of all preselected filter lists (assets.json) will then finally be automatically updated, too. I am still in the testing phase, but everything looks good and seems to work so far.

Cheers, AstroSkipper matrix.gif

Edited by AstroSkipper
correction
Link to comment
Share on other sites

Posted (edited)

@nicolaasjan Thank you for posting the news in the Pale Moon Forum! Can you please update your post there with the corrected news above? It had been formulated by me a little unclear. Therefore, I had to revise it again so that there are no misunderstandings about what will change. Thanks in advance! :)

Greetings from Germany, AstroSkipper matrix.gif

Edited by AstroSkipper
Link to comment
Share on other sites

9 hours ago, AstroSkipper said:

I have of course noticed that there is considerable interest in my mod uBlock Origin Legacy. I have therefore addressed the problem of updating an existing installation of my mod. With the upcoming release of uBlock Origin Legacy 1.16.4.34, it will then also be possible to install over an existing installation of my mod (1.16.4.34 and higher). The internal list of all preselected filter lists (assets.json) will then finally be automatically updated, too. I am still in the testing phase, but everything looks good and seems to work so far.

Hi, 1st of all thank you VERY MUCH for your work with ublock legacy, it's GREAT to see it being updated. :thumbup

I'd like to report a bug: ublock is detected here even with a list with anti-adblock https://www.ovagames.com/

This doesnt happen with the normal ublock on firefox.

 

Link to comment
Share on other sites

20 minutes ago, Felipefpl said:

I'd like to report a bug: ublock is detected here even with a list with anti-adblock https://www.ovagames.com/

This doesnt happen with the normal ublock on firefox.

 

Not seeing that here. This is more likely related with the filterlists used than with uBO itself. Make sure your filterlists are updated, and try alternative or better ones. I am not even using a specific anti-adblock list.

Edited by Amigafever
Link to comment
Share on other sites

Amigafever - Strange, i see the ads with basilisk, i'm using aside the ublock's lists the fanboy's ultimate list that has anti-adblock lists.

AstroSkipper - I meant ublock 1.56 on current version of firefox. ;)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...