I am a developer of Active Stop Button and first of all wanted to thank Giorgio for the NoScript addon, which I use by myself.
Now, concerning the modification of BrowserToolboxCustomizeDone.
Way by which this was done by me 4 years ago (by modifying source code in place with eval) is certainly deprecated. Nevertheless, it does not cause conflicts with extensions that properly insert their own handler in this function, unlike NoScript does it.
NoSctipt code listed above, simply redefines window.BrowserToolboxCustomizeDone, removing all handlers installed by other extensions previously. To preserve the operability of my extension, in case it is initialized prior to NoScript, I was forced to use a trick with a delayed startup. But if I would have used exactly the same technique as NoScript (redefine window.BrowserToolboxCustomizeDone), then I would have broke operation of NoScript.
The only possible way to avoid problems in this situation that I found, is to substitute handler CustomizeDone for a navigator-toolbox element (which defaults to BrowserToolboxCustomizeDone function), rather than the function itself:
Code: Select all
var ntoolbox = document.getElementById('navigator-toolbox');
_ToolboxCustomizeDone = ntoolbox.customizeDone;
ntoolbox.customizeDone = function MyCustomizeDone(aToolboxChanged) {
_ToolboxCustomizeDone(aToolboxChanged);
<custom code>
};
It is this solution was used in the Active Stop Button 1.4.2.
Also, I want to note that with the release of Firefox 4 (Gecko 2.0) introduced the new
toolbar customization events, which should help avoid future problems such as discussed above.