MozillaZine

keyboard shortcut to restart firefox? [Mac]

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

Post Posted June 27th, 2018, 11:16 pm

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: 132
Joined: January 29th, 2016, 4:36 pm

Post Posted June 27th, 2018, 11:18 pm

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: 3106
Joined: February 3rd, 2009, 6:29 pm

Post Posted June 28th, 2018, 3:01 am

@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=CustomizableUI.createWidge

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

German thread on userChrome.js
http://www.camp-firefox.de/forum/viewtopic.php?f=16&t=112673

Google search CustomizableUI.createWidget on camp-firefox.de
http://www.google.com/search?q=CustomizableUI.createWidget+site%3Acamp-firefox.de
http://www.google.com/search?q=CustomizableUI.createWidget+site%3Acamp-firefox.de+inurl%3At%3D112673

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

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

Combo widget example: viewtopic.php?p=14803615#p14803615

siffemoz
 
Posts: 132
Joined: January 29th, 2016, 4:36 pm

Post Posted June 30th, 2018, 12:24 am

Thanks much, morat.

Gingerbread Man

User avatar
 
Posts: 7743
Joined: January 30th, 2007, 10:55 am

Post Posted July 2nd, 2018, 5:26 am

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: 132
Joined: January 29th, 2016, 4:36 pm

Post Posted July 3rd, 2018, 1:19 am

Nice, but it looks like 62, not 61. At least, for me :-)

morat
 
Posts: 3106
Joined: February 3rd, 2009, 6:29 pm

Post Posted July 3rd, 2018, 6:31 am

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

Firefox 61.0
Windows 7 SP1 32-bit

siffemoz
 
Posts: 132
Joined: January 29th, 2016, 4:36 pm

Post Posted December 23rd, 2018, 11:28 pm

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/ad6e917d87787491538bac80d3c8918c

CustomizableUI
http://developer.mozilla.org/docs/Mozilla/JavaScript_code_modules/CustomizableUI.jsm
http://developer.mozilla.org/docs/Mozilla/JavaScript_code_modules/CustomizableUI.jsm/API-provided_widgets


Alas, it finally broke (Beta/Nightly) and even busts the FF interface; causes all fonts to be smaller and bold :-(

morat
 
Posts: 3106
Joined: February 3rd, 2009, 6:29 pm

Post Posted December 24th, 2018, 6:45 am

@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: 132
Joined: January 29th, 2016, 4:36 pm

Post Posted December 30th, 2018, 1:05 am

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: 3106
Joined: February 3rd, 2009, 6:29 pm

Post Posted December 31st, 2018, 6:39 am

@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: 132
Joined: January 29th, 2016, 4:36 pm

Post Posted December 31st, 2018, 10:58 pm

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: 3106
Joined: February 3rd, 2009, 6:29 pm

Post Posted January 3rd, 2019, 7:58 am

@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: 132
Joined: January 29th, 2016, 4:36 pm

Post Posted January 4th, 2019, 12:42 am

Aha! Thanks for the explanation.

Return to Firefox Support


Who is online

Users browsing this forum: No registered users and 10 guests