keyboard shortcut to restart firefox? [Mac]

User Help for Mozilla Firefox
siffemoz
Posts: 250
Joined: January 29th, 2016, 4:36 pm

Re: keyboard shortcut to restart firefox? [Mac]

Post by siffemoz »

Got it! I had either downloaded userChrome.xml or copied the contents into Notepad and apparently it messed up somewhere. I copied the contents and saved in a Notepad++ file this time. Button showed up right on the toolbar :-)
Way cool; will see if it works on Beta and Nightly.
siffemoz
Posts: 250
Joined: January 29th, 2016, 4:36 pm

Re: keyboard shortcut to restart firefox? [Mac]

Post by siffemoz »

Yup, works there too. Thanks so much for your assistance!

Where/how do I find some other useful buttons I can add that way?
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: keyboard shortcut to restart firefox? [Mac]

Post by morat »

@siffemoz
Sporif wrote:It's very possible that at some future time the Firefox team will remove some or all of the functionality that makes this possible, so enjoy it while you can.
Google search CustomizableUI.createWidget
http://www.google.com/search?q=Customiz ... reateWidge

Stack overflow search CustomizableUI.createWidget
http://stackoverflow.com/search?q=Custo ... eateWidget

German thread on userChrome.js
http://www.camp-firefox.de/forum/viewto ... 6&t=112673

Google search CustomizableUI.createWidget on camp-firefox.de
http://www.google.com/search?q=Customiz ... firefox.de
http://www.google.com/search?q=Customiz ... t%3D112673

Luke Baker customizations
http://luke-baker.github.io/

Xiao customizations
http://github.com/xiaoxiaoflood/firefox-scripts

Combo widget example: http://forums.mozillazine.org/viewtopic ... #p14803615
siffemoz
Posts: 250
Joined: January 29th, 2016, 4:36 pm

Re: keyboard shortcut to restart firefox? [Mac]

Post by siffemoz »

Thanks much, morat.
User avatar
Gingerbread Man
Posts: 7735
Joined: January 30th, 2007, 10:55 am

Re: keyboard shortcut to restart firefox? [Mac]

Post by Gingerbread Man »

Starting with Firefox 61, you can open the Browser Console (Ctrl+Shift+J or Cmd+Shift+J), after which you can restart the browser by pressing Ctrl+Alt+R or Cmd+Alt+R.
siffemoz
Posts: 250
Joined: January 29th, 2016, 4:36 pm

Re: keyboard shortcut to restart firefox? [Mac]

Post by siffemoz »

Nice, but it looks like 62, not 61. At least, for me :-)
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: keyboard shortcut to restart firefox? [Mac]

Post by morat »

The keyboard shortcut works for me. (hat tip to gingerbread man)

Firefox 61.0
Windows 7 SP1 32-bit
siffemoz
Posts: 250
Joined: January 29th, 2016, 4:36 pm

Re: keyboard shortcut to restart firefox? [Mac]

Post by siffemoz »

morat wrote:
siffemoz wrote:So no way to revive it?
*** for advanced users only ***

You could use the CustomizableUI.createWidget method to create a restart button.

I don't know if the hack works in Nightly. I'm using similar buttons in the release build.

Firefox Quantum compatible userChrome.js
http://github.com/Sporif/firefox-quantum-userchromejs

Restart Button
http://gist.github.com/Sporif/ad6e917d8 ... 80d3c8918c

CustomizableUI
http://developer.mozilla.org/docs/Mozil ... ableUI.jsm
http://developer.mozilla.org/docs/Mozil ... ed_widgets
Alas, it finally broke (Beta/Nightly) and even busts the FF interface; causes all fonts to be smaller and bold :-(
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: keyboard shortcut to restart firefox? [Mac]

Post by morat »

@siffemoz

My restart button using the CustomizableUI interface works in the release and beta builds.

Firefox 64.0
Firefox 65.0b6
Windows 7 SP1 32-bit
siffemoz
Posts: 250
Joined: January 29th, 2016, 4:36 pm

Re: keyboard shortcut to restart firefox? [Mac]

Post by siffemoz »

Yeah, it still works; I had a misplaced or missing left paren somewhere. However, it causes fonts to be either smaller or larger, and all bold, everywhere. Even with a new profile, no extensions, nothing in userChrome.css but the code, and no userContent.css.

No button: https://www.dropbox.com/s/x2tx1ydyl96pn ... n.jpg?dl=0
Button: https://www.dropbox.com/s/twuc6lwwvnea9 ... n.jpg?dl=0

I went to https://github.com/Sporif/firefox-quant ... Chrome.css and found the code had changed a bit:

from toolbarbutton#alltabs-button {
-moz-binding: url("userChrome.xml#js");}

to #PanelUI-menu-button {
-moz-binding: url("userChrome.xml#js")
}

Both still work for me though. Totally perplexed...
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: keyboard shortcut to restart firefox? [Mac]

Post by morat »

@siffemoz

The "PanelUI-menu-button" id for the "Open menu" or hamburger button.

The "alltabs-button" id is for the "List all tabs" button. The list all tabs button breaks with the old userChrome.css file starting in Firefox 62.

I rarely open 18+ tabs to even see the list all tabs button.
Last edited by morat on January 3rd, 2019, 10:22 am, edited 1 time in total.
siffemoz
Posts: 250
Joined: January 29th, 2016, 4:36 pm

Re: keyboard shortcut to restart firefox? [Mac]

Post by siffemoz »

OK, I have no idea why

#PanelUI-menu-button {
-moz-binding: url("userChrome.xml#js")
}

produces the restart button, but I figured out the font size problem. I had previous userChrome.css files in the Chrome folder, renamed to userChrome_old.css and userChrome2_.css. They were being read on startup and causing the problem! How does that happen??
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: keyboard shortcut to restart firefox? [Mac]

Post by morat »

@siffemoz

The userChrome.xml file runs the following files if present.

* userChrome.js
* userChrome.xul
* example.uc.js
* example.uc.xul
* example.as.css
* example.css

The example string can be any string like... userChrome_old or userChrome2_
siffemoz
Posts: 250
Joined: January 29th, 2016, 4:36 pm

Re: keyboard shortcut to restart firefox? [Mac]

Post by siffemoz »

Aha! Thanks for the explanation.
siffemoz
Posts: 250
Joined: January 29th, 2016, 4:36 pm

Re: keyboard shortcut to restart firefox? [Mac]

Post by siffemoz »

Here we go again; now broken on FF v68. Here's the fix:

1. In userChrome.css, replace

#PanelUI-menu-button {-moz-binding: url("userChrome.xml#js") }
with
toolbarbutton#alltabs-button {-moz-binding: url("userChrome.xml#js") }

2. Replace the text in userChrome.xml with the text from the userChrome.xml at https://github.com/Sporif/firefox-quantum-userchromejs
Post Reply