Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.
Moderators: FranklinDM, Lootyhoof
-
UCyborg
- Board Warrior

- Posts: 1086
- Joined: 2019-01-10, 09:37
- Location: Slovenia
Post
by UCyborg » 2026-06-29, 20:20
sinfulosd wrote: ↑2026-06-29, 17:19
It's because the previous Options page wasn't really that interesting to look at - It was basically reserved for a niche use. The one I'm offering is a lot more handy, you'd basically use it a lot more, which made you notice this particular mechanism. I guess that's a sign of me doing something so right, which I sometimes need to see these signs.
Off-topic:
sinfulosd wrote: ↑2026-06-29, 17:19
As for the development of uBO, this is probably the most tedious and mundane thing I have ever engaged in my entire life. Dealing with an extension that has a total of 25.000+ lines of code,
all by myself, is insane, not to mention that I have to deal with so many APIs that doesn't have an exact equivalent, forcing me into scenarios that is equivalent to performing a brain surgery, but instead of using a scalpel, I'll be using a butcher knife.
Oh yeah, this thing is crazy. I can't even bring myself to look at it anymore. .NET stuff (C#) at work is almost relaxing compared to this.
I guess developing for obscure platform with scarce helpful resources doesn't help either.
The Merovingian wrote:Choice is an illusion, created between those with power, and those without.
-
UCyborg
- Board Warrior

- Posts: 1086
- Joined: 2019-01-10, 09:37
- Location: Slovenia
Post
by UCyborg » 2026-07-01, 16:40
I think I found a bug (or is it a feature?). Say I have a user script that executes for a particular URL, then I navigate to another page and then right back with the back button so that the browser loads old page from the cache. In this case, the script is executed again.
In case of
old.reddit.com login form redirection fix, this results in another login form being added on the page you're returning to.
Also works with simple script that just calls alert(), alert is then shown again when navigating back.
If I'm not mistaken, back-forward cache is meant to restore JavaScript state as well, so such script should be considered already executed and not run again.
The Merovingian wrote:Choice is an illusion, created between those with power, and those without.
-
sinfulosd
- Fanatic

- Posts: 106
- Joined: 2022-07-13, 03:01
Post
by sinfulosd » 2026-07-02, 02:34
UCyborg wrote: ↑2026-07-01, 16:40
I think I found a bug (or is it a feature?). Say I have a user script that executes for a particular URL, then I navigate to another page and then right back with the back button so that the browser loads old page from the cache. In this case, the script is executed again.
In case of
old.reddit.com login form redirection fix, this results in another login form being added on the page you're returning to.
Also works with simple script that just calls alert(), alert is then shown again when navigating back.
If I'm not mistaken, back-forward cache is meant to restore JavaScript state as well, so such script should be considered already executed and not run again.
That's a feature, not a bug. It was also added in Violentmonkey version 2.12.8 and in Tampermonkey, albeit I don't exactly know the version that it was added in Tampermonkey, but he commented that
it's an intended feature on his extension.
I also made a userscript to test it out by myself on all 3 userscript managers of Violentmonkey, Tampermonkey, and Greasemonkey for UXP:
BFCache Test Script.user.js
Wouldn't it make more sense for a userscript to still work, when you navigate to a website that a particular userscript should work in it, even when it's navigated through the browser cache?!
P.S. It's easier to test out a "bug" on the mainstream userscript managers on Chrome and Firefox, before identifying them as such, since I made my modern fork to behave as close as it can get to the mainstream userscript managers. (It's basically the only way to obtain the 100% compatibility with all the current userscripts)
You do not have the required permissions to view the files attached to this post.
Windows 11
Pale Moon 34.3.0, Firefox 151.0.3, Ungoogled Chromium 148.0
Developing and maintaining Greasemonkey for UXP
-
UCyborg
- Board Warrior

- Posts: 1086
- Joined: 2019-01-10, 09:37
- Location: Slovenia
Post
by UCyborg » 2026-07-02, 17:04
Put:
BEFORE:
in your script, then you'll see the the issue.
But even without that, the script logs "[BFCache Test] Script injected. Waiting for pageshow event..." every time on GreaseMonkey for UXP while on Tampermoney and Violentmonkey, it's only logged on fresh load.
By your extension's logic, browser should run all JavaScript files and inline scripts included on the page again from the beginning, line by line. But that's not how it works when restoring cached state, think of it like restoring virtual machine state from the snapshot taken earlier.
The Merovingian wrote:Choice is an illusion, created between those with power, and those without.
-
sinfulosd
- Fanatic

- Posts: 106
- Joined: 2022-07-13, 03:01
Post
by sinfulosd » 2026-07-02, 18:13
Ah, okay, I see what you mean now.
I did confirm the behavior on the 3 userscript managers (the "Waiting for pageshow event.." was also showing to me, while I was using Tampermonkey on Firefox and Violentmonkey on Chrome, BTW), you are right, the alert fires with the BFCache in my extension, while the other mainstream userscript managers do not. I'll add that to my personal note of the things to tackle with on my extension (I discovered that it's a lot better, for me and for the users, to gather all issues and fix them all in a major release, instead of incremental patches, as long as no issue is reported to break something major in the extension or has a vulnerability in it).
Windows 11
Pale Moon 34.3.0, Firefox 151.0.3, Ungoogled Chromium 148.0
Developing and maintaining Greasemonkey for UXP
-
UCyborg
- Board Warrior

- Posts: 1086
- Joined: 2019-01-10, 09:37
- Location: Slovenia
Post
by UCyborg » 2026-07-02, 19:11
While the Reddit script could be changed in the meantime for its code to run on load event or similar or perhaps just by storing that it was already run in the variable and check that variable, it looks like it has become useless at this point as the old endpoint to login to Reddit is no more.
The Merovingian wrote:Choice is an illusion, created between those with power, and those without.