Customize Firefox tab

Post information about bugs here

Customize Firefox tab

Postby morat » Wed Aug 20, 2014 4:11 pm

Is the Customize Firefox tab (i.e. about:customizing) compatible with Custom Buttons?

Firefox ESR 24 - test is always 1 after adding button to toolbar, init code runs once
Firefox ESR 31 - test is more than 1 after adding button to toolbar, init code runs more than once (bug)

Code: Select all
/*Initialization code*/
var uid = "__unique_identifier_" + this.id;
this.onclick = function (event) {
  if (event.button == 0) {
    custombuttons.alertBox("Test", String(window[uid]));
  }
  if (event.button == 1) {
    delete window[uid];
  }
};
if (typeof window[uid] == "undefined") {
  window[uid] = 0;
}
window[uid]++;
content.document.title = "Test: " + window[uid];

Can someone test this button with an Australis build?

Custom Buttons 0.0.5.8
Firefox ESR 31.0
Windows 7 SP1 32-bit
morat
 
Posts: 944
Joined: Wed Dec 28, 2011 2:38 pm

Re: Customize Firefox tab

Postby makondo » Wed Aug 20, 2014 5:50 pm

I have (and had with all Australis builds, using Fx beta always) a problem when a freshly installed button will not show in the customize until i restart. Sometimes, even after i restart and place a button on a toolbar, then navigate away from the Customize tab (or close it), the button will disappear from the toolbar AND from the Customize tab. It will show in the Customize tab again after a restart and this time placing it on some toolbar will work.
But the biggest problem i see is toolbar buttons shifting when switching to/from the Customize tab and you can't do anything util they're done shifting and set in place. VERY annoying. Interestingly enough, i don't see this in profiles where i don't have CB installed.

Now, about the button above, since i have no idea what it's suppose to do and what i suppose to be seeing, i'm afraid i won't be testing it, sorry.
makondo
 
Posts: 1635
Joined: Sun Dec 25, 2011 7:17 pm

Re: Customize Firefox tab

Postby morat » Thu Aug 21, 2014 5:24 am

makondo wrote:I have no idea what it's suppose to do.

The button counts the number of times the initialization code is run.

* left click - show the counter
* middle click - reset the counter

I use the web page title to view the counter as it changes.

Thanks for reply.
morat
 
Posts: 944
Joined: Wed Dec 28, 2011 2:38 pm

Re: Customize Firefox tab

Postby Odyseus » Thu Oct 30, 2014 2:32 am

Hello, morat.
I did not see your post until now. I'm struggling with a similar problem since the first time I tried CustomButtons on Australis (over a year ago). I always assumed it was a normal behavior, but as I use and create more buttons, the performance of my browser is dying and I can't be OK with that behavior.

According to the tests I've done with my little knowledge, the problem depends on what type of button is created. In short, "button" type buttons are initialized once, "menu" type buttons are initialized twice and "menu-button" type buttons are initialized thrice (three times!).

An easy way to test this is to create a new blank button and put the following code inside the Initialization tab. Better to use an existing button already placed. Otherwise, the stupid about:customizing interface will not let you place the button because the alert breaks the drag operation.

This code will trigger the alert only once:
Code: Select all
alert();
this.type = "button";


This code will trigger the alert two times:
Code: Select all
alert();
this.type = "menu";


This code will trigger the alert three times:
Code: Select all
alert();
this.type = "menu-button";


At first I thought that the double/triple initialization happened when I was editing the button and saving the changes. But lately I noticed that it also happens when the browser starts. This can not be normal, right? It is a total waste of resources. Oddly enough, the double/triple initialization does not happen on start/exit customizing. But is triggered a millon times while dragging the button over the different areas.

I can work around this problem by creating a "button" type button that opens a menupopup on click. But this kind of button "feels" slower than a "pure" "menu" type button. I would really like for this behavior to be corrected.

Image
Odyseus
 
Posts: 434
Joined: Sun Mar 10, 2013 12:51 pm


Return to Bug report

cron