Toolbar customization issue: can't have empty space at the right of toolbar?

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
fr0zensphere

Toolbar customization issue: can't have empty space at the right of toolbar?

Unread post by fr0zensphere » 2019-03-03, 19:19

Admittedly, this is a pretty minor thing. I was trying to customize my toolbar so that there's empty space at the very right of the toolbar. (I just happen to like how it looks.) What I did was I right-click on toolbar -> Customize, and then I dragged the "Space" item from the Customize Toolbar window to the very right. Initially it appears to work, but then every new PM window opened automatically moves the space one slot over to the left, so that I end up with this:
PaleMoon customization issue.png
You see, the space is now between my Ublock Origin icon and the Evernote icon, instead of being to the right of UO icon. I want it to stay to the right of my UO icon. Is it possible to force it do that?
You do not have the required permissions to view the files attached to this post.

User avatar
Lootyhoof
Themeist
Themeist
Posts: 1569
Joined: 2012-02-09, 23:35
Location: United Kingdom

Re: Toolbar customization issue: can't have empty space at the right of toolbar?

Unread post by Lootyhoof » 2019-03-03, 19:28

The icon for uBlock Origin in particular is added with JS after the window is spawned, so no. You could try moving that to another toolbar though.

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2194
Joined: 2018-05-05, 13:29

Re: Toolbar customization issue: can't have empty space at the right of toolbar?

Unread post by vannilla » 2019-03-03, 21:20

This is a funny bug in both uBlock and uMatrix.
I fixed it for my eMatrix fork, so if you use it you can place a spacer after the eMatrix icon.
Maybe you could suggest the same fix for uBlock to its developer?

JustOff

Re: Toolbar customization issue: can't have empty space at the right of toolbar?

Unread post by JustOff » 2019-03-03, 22:24

vannilla wrote:I fixed it for my eMatrix fork, so if you use it you can place a spacer after the eMatrix icon.
Sorry, but your fix is incomplete, because it does not take into account the possibility of having multiple spacers, and also does not handle springs and separators that have a similar problem.

I think something like this should do the job:

Code: Select all

            for ( var i = index + 1, special; i < currentset.length; i++ ) {
                if ( (special = /^(spring|spacer|separator)$/.exec(currentset[i])) !== null ) {
                    var spels = toolbar.querySelectorAll('toolbar' + special[1]);
                    var spcnt = currentset.slice(i - currentset.length).filter(s => s == special[1]).length;
                    before = toolbar.querySelector('[id="' + spels[spels.length - spcnt].id + '"]');
                } else {
                    before = toolbar.querySelector('[id="' + currentset[i] + '"]');
                }
                if ( before !== null ) {
                    break;
                }
            }

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2194
Joined: 2018-05-05, 13:29

Re: Toolbar customization issue: can't have empty space at the right of toolbar?

Unread post by vannilla » 2019-03-04, 01:29

JustOff wrote:
vannilla wrote:I fixed it for my eMatrix fork, so if you use it you can place a spacer after the eMatrix icon.
Sorry, but your fix is incomplete, because it does not take into account the possibility of having multiple spacers, and also does not handle springs and separators that have a similar problem.
You are indeed right, as I didn't consider those cases.
I'll patch it during the week.
Thanks for the report.

fr0zensphere

Re: Toolbar customization issue: can't have empty space at the right of toolbar?

Unread post by fr0zensphere » 2019-03-04, 02:05

So, to double-check: are you guys saying that the only way for this to be fixed is if the developer(s) of UO fixes this bug?

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2194
Joined: 2018-05-05, 13:29

Re: Toolbar customization issue: can't have empty space at the right of toolbar?

Unread post by vannilla » 2019-03-04, 07:57

fr0zensphere wrote:So, to double-check: are you guys saying that the only way for this to be fixed is if the developer(s) of UO fixes this bug?
Yes.
If you want a comparison, Adblock Latitude uses the same method to add its icon to the toolbar, but it doesn't have this problem (i.e. you can add spacers and similar after it.)
So it's ultimately a bug in uBlock.

User avatar
Giraffe
Lunatic
Lunatic
Posts: 402
Joined: 2016-11-09, 11:57

Re: Toolbar customization issue: can't have empty space at the right of toolbar?

Unread post by Giraffe » 2019-03-04, 08:19

Lootyhoof wrote:The icon for uBlock Origin in particular is added with JS after the window is spawned, so no. You could try moving that to another toolbar though.
When I had trouble with the icon for uBlock disappearing all the while I put it on the top of the Sidebar (using AIOS at the time, now TGOS). The icon stayed put :D and now, having just tried it, so do spaces on the RHS of the main toolbar.
Windows 7 Pro 32-bit. Comodo Internet security or Comodo Firewall + Avira Anivirus.

JustOff

Re: Toolbar customization issue: can't have empty space at the right of toolbar?

Unread post by JustOff » 2019-03-04, 13:04

fr0zensphere wrote:So, to double-check: are you guys saying that the only way for this to be fixed is if the developer(s) of UO fixes this bug?
I sent my suggestion to fix this issue to the uBlock Origin author.

JustOff

Re: Toolbar customization issue: can't have empty space at the right of toolbar?

Unread post by JustOff » 2019-03-04, 15:08

The issue has been solved in uBlock Origin 1.16.4.9.

fr0zensphere

Re: Toolbar customization issue: can't have empty space at the right of toolbar?

Unread post by fr0zensphere » 2019-03-05, 00:42

JustOff wrote:I sent my suggestion to fix this issue to the uBlock Origin author.
Whoa, amazing, thanks for doing that! :clap:

I downloaded the updated version--looks good. :thumbup:

User avatar
Night Wing
Knows the dark side
Knows the dark side
Posts: 5174
Joined: 2011-10-03, 10:19
Location: Piney Woods of Southeast Texas, USA

Re: Toolbar customization issue: can't have empty space at the right of toolbar?

Unread post by Night Wing » 2019-03-05, 11:38

JustOff wrote:The issue has been solved in uBlock Origin 1.16.4.9.
Thank you for getting in touch with Gorhill so he could fix the issue. It works in both linux and windows Pale Moon. Much appreciated.
Linux Mint 21.3 (Virginia) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
MX Linux 23.2 (Libretto) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
Linux Debian 12.5 (Bookworm) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox