User Agent Status removed my added toolbar

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 933
Joined: 2021-01-26, 11:18

Re: User Agent Status removed my added toolbar

Unread post by Kris_88 » 2022-10-10, 13:04

moonbat wrote:
2022-10-10, 12:30
If any of the other addons on the toolbar is restartless, you'll run into this problem.
In fact, restartless can be made reliable. But the authors of add-ons copy each other ...

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: User Agent Status removed my added toolbar

Unread post by moonbat » 2022-10-10, 13:51

Kris_88 wrote:
2022-10-10, 13:04
restartless can be made reliable
How do we do that? I've avoided making restartless extensions so far.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 933
Joined: 2021-01-26, 11:18

Re: User Agent Status removed my added toolbar

Unread post by Kris_88 » 2022-10-10, 14:45

moonbat wrote:
2022-10-10, 13:51
How do we do that? I've avoided making restartless extensions so far.
Here, an example.
This hosting will delete the file after 1 hour.
https://tmpfiles.org/dl/124168/example.zip

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: User Agent Status removed my added toolbar

Unread post by moonbat » 2022-10-10, 14:55

Thanks. What's the initialization mistake other extensions make, compared to this one?
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 933
Joined: 2021-01-26, 11:18

Re: User Agent Status removed my added toolbar

Unread post by Kris_88 » 2022-10-10, 15:19

The authors are trying to insert their button into the toolbar (where the user moved it). And if it is not in the toolbars, then they are inserted the button into the palette.
In fact, the button should always be inserted into the palette, and then we must update the toolbars.
It is very easy to do, because the browser has a ready-made mechanism for this.

Code: Select all

   // update toolbars
    let elms = win.document.querySelectorAll("toolbar");
    for(let elm of elms) {
      if(elm.getAttribute("customizable")=="true") {
        elm.currentSet = elm.getAttribute("currentset");
      };
    };

Michaell
Lunatic
Lunatic
Posts: 282
Joined: 2018-05-26, 18:13

Re: User Agent Status removed my added toolbar

Unread post by Michaell » 2022-10-10, 23:06

moonbat, this toolbar removal issue isn't just when there are restartless extension buttons on the added toolbar. I've seen it with just PM's built in buttons. But it may still be related to having restartless extensions installed in the profile even when they don't have a button on the added bar. There are old posts here that point the finger at restartless extensions but it seems there wasn't anything definitive identified (at least in the threads I found).

Kris_88, I agree that extensions should not auto insert their button at the right end of the location bar. I always end up moving them where I want them anyway (I keep my location bar with very few buttons.) Question is I guess can something be done (an extension?) to prevent that behavior. Just relying on extension developers won't do, and a lot of extensions aren't maintained anymore anyway.
Win10home(1709), PM33.0.0-portable as of Feb 1, '24

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 933
Joined: 2021-01-26, 11:18

Re: User Agent Status removed my added toolbar

Unread post by Kris_88 » 2022-10-11, 01:35

Michaell wrote:
2022-10-10, 23:06
Kris_88, I agree that extensions should not auto insert their button at the right end of the location bar.
It's not a problem. The add-ons can place its elements anywhere, for reasons of the author. But the customization mechanism is quite complicated and the problem arises when the author tries to rewrite this mechanism, instead of using the built-in one. It is quite difficult to rewrite it so that it does not conflict with the built-in.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: User Agent Status removed my added toolbar

Unread post by moonbat » 2022-10-11, 01:38

I partly blame the absolute mess that Mozilla's documentation was, after going through it myself. Amazing how with millions of dollars from Google they never bothered to hire a decent technical writer and keep the pages up to date with changes to Firefox or structure them for easy discoverability. Lots of places with 'to do' or 'needs an example' and the best documentation seems to have been written by third party volunteers and then added to their site.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

Michaell
Lunatic
Lunatic
Posts: 282
Joined: 2018-05-26, 18:13

Re: User Agent Status removed my added toolbar

Unread post by Michaell » 2022-10-11, 03:58

Kris_88, perhaps not a problem in theory/intent, but is a problem in practice. Other buttons get bumped off the toolbar and not all end up in the Palette. Sometimes it takes creating a new profile to get them back. And there may be a connection of that with the added toolbar disappearing.
Win10home(1709), PM33.0.0-portable as of Feb 1, '24

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: User Agent Status removed my added toolbar

Unread post by moonbat » 2022-10-11, 04:33

They write it incorrectly due to ignorance of or ignoring the documentation, which is pretty badly organized as I said. Another common problem in the early days of Firefox 3.x when it used to be accused of hogging memory was due to extensions not properly removing event listeners that they had added.The original Link Alert used to have this problem back then, I contributed a fix for the fork.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

Locked