Ref: https://addons.mozilla.org/en-US/firefo ... /versions/
Improved compatibility with addons, which thoughtlessly redefine BrowserToolboxCustomizeDone, like NoScript
Improved compatibility with addons, which thoughtlessly redefine BrowserToolboxCustomizeDone, like NoScript
Code: Select all
let btcd = window.BrowserToolboxCustomizeDone;
if (btcd) window.BrowserToolboxCustomizeDone = function(done) {
btcd(done);
if (done) noscriptOverlay.initPopups();
}
Code: Select all
eval("BrowserToolboxCustomizeDone ="+BrowserToolboxCustomizeDone.toString().replace(
/{/,"{"+"ASB_BrowserToolboxCustomizeDone();"));
Code: Select all
var ntoolbox = document.getElementById('navigator-toolbox');
_ToolboxCustomizeDone = ntoolbox.customizeDone;
ntoolbox.customizeDone = function MyCustomizeDone(aToolboxChanged) {
_ToolboxCustomizeDone(aToolboxChanged);
<custom code>
};
Sorry, but I fail to see how you would. Could you explain it in more details?JustOff wrote: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.