Custom Buttons help please

Talk about add-ons and extension development.
Post Reply
Bozz
Posts: 2684
Joined: October 18th, 2007, 1:53 pm

Custom Buttons help please

Post by Bozz »

I need some help creating some Custom Buttons please. If anyone can help, I would appreciate it. In SeaMonkey.

I need the codes for:

Page Info
Error Console
about:config
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: Custom Buttons help please

Post by morat »

These commands work in Firefox 62.

Code: Select all

/*Code*/
BrowserPageInfo();

Code: Select all

/*Code*/
document.getElementById("menu_browserConsole").click();

Code: Select all

/*Code*/
gBrowser.addTab("about:config");
Get Command
http://custombuttons.sourceforge.net/fo ... ?f=4&t=531

Get Command (simplified version)
http://custombuttons.sourceforge.net/fo ... 3742#p3742
Bozz
Posts: 2684
Joined: October 18th, 2007, 1:53 pm

Re: Custom Buttons help please

Post by Bozz »

Thanks morat. I doing some pre-troubleshooting/problem solving for SeaMonkey 2.53 when it gets into a release state.

The old codefisher toolbar-buttons addon I have doesn't work with SM 2 53. Something in the latest codefisher toolbar-buttons breaks SM. Every time I launch SM, it doesn't remember the window size. The window gets bigger each time I open SM. It happens SM 2.49.* and 2.53. Custom Buttons lets me replace it.

Thanks for the Get Command link. That will help with any more buttons I might need.
Bozz
Posts: 2684
Joined: October 18th, 2007, 1:53 pm

Re: Custom Buttons help please

Post by Bozz »

This opens about:config in a foreground tab.

Code: Select all

gBrowser.selectedTab = gBrowser.addTab("about:config", null, null, null, false, false);
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: Custom Buttons help please

Post by morat »

You need the correct triggeringPrincipal in Firefox 63.

Code: Select all

gBrowser.selectedTab = gBrowser.addTab("about:config", {
  triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
});
Post Reply