context menu

User Help for Mozilla Firefox
Post Reply
User avatar
lovemyfoxy
Posts: 2337
Joined: December 11th, 2009, 11:23 am
Location: USA

context menu

Post by lovemyfoxy »

I'm doing work that requires speed by seconds. Is there a way to reorder the items in the right-click menu so one item is always on top?
2 Desktops--Win 7 Ult.SP1 x64/6GB RAM /Firefox 52.9ESR/Waterfox64 2022.11/Thunderbird 52.9ESR/BitWarden PW Manager/Verizon FIOS wired network
pokeefe0001
Posts: 103
Joined: January 18th, 2010, 4:25 pm
Location: Pacific Northwest, USA

Re: context menu

Post by pokeefe0001 »

Prior to FF 57 the add-on Menu Wizard would do that. Now wanting to reorder the context menu is unthinkable.
Patrick O'Keefe
Win11 x64 Pro, FF 113.0.2 TB 102.7.2
morat
Posts: 6405
Joined: February 3rd, 2009, 6:29 pm

Re: context menu

Post by morat »

Try something like:

Code: Select all

/* Firefox userChrome.css */

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

#contentAreaContextMenu > * { -moz-box-ordinal-group: 2 !important; }

#context-copylink { -moz-box-ordinal-group: 1 !important; } /* Copy Link Location */
http://kb.mozillazine.org/UserChrome.css
User avatar
smsmith
Moderator
Posts: 19979
Joined: December 7th, 2004, 8:51 pm
Location: Indiana

Re: context menu

Post by smsmith »

What command are you trying to use? Maybe you could install a mouse gesture extension to accomplish the same task?

Also, as I'm a curious bugger, what "work" is this?
Give a man a fish, and he eats for a day. Teach a man to fish, and he eats for a lifetime.
I like poetry, long walks on the beach and poking dead things with a stick.
Please do not PM me for personal support. Keep posts here in the Forums instead and we all learn.
pokeefe0001
Posts: 103
Joined: January 18th, 2010, 4:25 pm
Location: Pacific Northwest, USA

Re: context menu

Post by pokeefe0001 »

morat wrote:Try something like:

Code: Select all

/* Firefox userChrome.css */

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

#contentAreaContextMenu > * { -moz-box-ordinal-group: 2 !important; }

#context-copylink { -moz-box-ordinal-group: 1 !important; } /* Copy Link Location */
http://kb.mozillazine.org/UserChrome.css
I hope FF developers don't really think that allowing us to use CSSs is somehow a replacement for the all the add-ons that no longer work. I can understand the 1st line - the comment. The rest is meaningless to me. Does that reorder the context menu?
Patrick O'Keefe
Win11 x64 Pro, FF 113.0.2 TB 102.7.2
User avatar
lovemyfoxy
Posts: 2337
Joined: December 11th, 2009, 11:23 am
Location: USA

Re: context menu

Post by lovemyfoxy »

morat wrote:Try something like:

Code: Select all

/* Firefox userChrome.css */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#contentAreaContextMenu > * { -moz-box-ordinal-group: 2 !important; }
#context-copylink { -moz-box-ordinal-group: 1 !important; } /* Copy Link Location */
http://kb.mozillazine.org/UserChrome.css
I inserted the code. How would it know which one I want on top? It'd not a link but an extension.
2 Desktops--Win 7 Ult.SP1 x64/6GB RAM /Firefox 52.9ESR/Waterfox64 2022.11/Thunderbird 52.9ESR/BitWarden PW Manager/Verizon FIOS wired network
User avatar
Frank Lion
Posts: 21173
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom
Contact:

Re: context menu

Post by Frank Lion »

smsmith wrote:Also, as I'm a curious bugger, what "work" is this?
Speed dating? Buying copper futures? Walmart coupon giveaways? Clock chess or Clock embroidery.....give up, what is it?
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
morat
Posts: 6405
Joined: February 3rd, 2009, 6:29 pm

Re: context menu

Post by morat »

@LoveMyFoxy

You can use the label attribute if you don't know the id.

Code: Select all

/* Firefox userChrome.css */

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

#contentAreaContextMenu > * { -moz-box-ordinal-group: 2 !important; }

menuitem[label="Block element"] { -moz-box-ordinal-group: 1 !important; } /* Adblock Plus */

Code: Select all

/* Firefox userChrome.css */

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

menuitem[label="Block element"] { -moz-box-ordinal-group: 0 !important; } /* Adblock Plus */
The first example didn't work for me when testing with the ABP extension.

The docs say the value must be greater than zero, but the second example works for me.

CSS -moz-box-ordinal-group
http://developer.mozilla.org/en-US/docs ... inal-group
User avatar
lovemyfoxy
Posts: 2337
Joined: December 11th, 2009, 11:23 am
Location: USA

Re: context menu

Post by lovemyfoxy »

Frank Lion wrote:
smsmith wrote:Also, as I'm a curious bugger, what "work" is this?
Speed dating? Buying copper futures? Walmart coupon giveaways? Clock chess or Clock embroidery.....give up, what is it?
Those aren't work, and I wouldn't bother all of you for anything trivial. It's MTSuite, a massive script script, not a Greasemonkey script, that's part of some online work I do for Amazon, and I use it on a different FF profile. Anything more than that would be too complex to explain here, other than that it supplements my Social Security.

2nd script doesn't work either, but it moved UBlock Origin and LastPass to the top, although I didn't ask it to. MTSuite's still below 14 other commands. Maybe the css code doesn't work with scripts.

Thanks for all your help.
2 Desktops--Win 7 Ult.SP1 x64/6GB RAM /Firefox 52.9ESR/Waterfox64 2022.11/Thunderbird 52.9ESR/BitWarden PW Manager/Verizon FIOS wired network
User avatar
Frank Lion
Posts: 21173
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom
Contact:

Re: context menu

Post by Frank Lion »

LoveMyFoxy wrote:MTSuite's still below 14 other commands.
It would be.

morat isn't a mind reader and it's only in your last post that you actually reveal what you are trying to move. Meantime, he was giving you an example of the general principle, while they all killed time waiting for the big reveal.
LoveMyFoxy wrote:Maybe the css code doesn't work with scripts.
It's just a regular css menu entry, where that links to is irrelevant.
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
aborix
Posts: 29
Joined: October 23rd, 2017, 1:23 pm

Re: context menu

Post by aborix »

An alternative to -moz-box-ordinal-group is flexbox:
https://developer.mozilla.org/en-US/doc ... of_Flexbox

As an example we take the menuitem "View Page Source":

Code: Select all

#contentAreaContextMenu .scrollbox-innerbox {display: flex; flex-direction: column}
#context-viewsource {order: -1}

#context-navigation {display: flex}
#context-navigation > .menuitem-iconic {flex: auto}
User avatar
lovemyfoxy
Posts: 2337
Joined: December 11th, 2009, 11:23 am
Location: USA

Re: context menu

Post by lovemyfoxy »

Frank Lion wrote:
LoveMyFoxy wrote:MTSuite's still below 14 other commands.
It would be.

morat isn't a mind reader and it's only in your last post that you actually reveal what you are trying to move. Meantime, he was giving you an example of the general principle, while they all killed time waiting for the big reveal.
LoveMyFoxy wrote:Maybe the css code doesn't work with scripts.
It's just a regular css menu entry, where that links to is irrelevant.
No one sits and waits for replies, unless some of you don't have a life. ;-)

@aborix-- where do I put MTSuite in that last code?
2 Desktops--Win 7 Ult.SP1 x64/6GB RAM /Firefox 52.9ESR/Waterfox64 2022.11/Thunderbird 52.9ESR/BitWarden PW Manager/Verizon FIOS wired network
aborix
Posts: 29
Joined: October 23rd, 2017, 1:23 pm

Re: context menu

Post by aborix »

Try this code. In the second line put the exact text of the item between the quotation marks.
If the text is "MTSuite" then it's this:

Code: Select all

#contentAreaContextMenu .scrollbox-innerbox {display: flex; flex-direction: column}
#contentAreaContextMenu *[label="MTSuite"] {order: -1}

#context-navigation {display: flex}
#context-navigation > .menuitem-iconic {flex: auto}
User avatar
lovemyfoxy
Posts: 2337
Joined: December 11th, 2009, 11:23 am
Location: USA

Re: context menu

Post by lovemyfoxy »

Doesn't work, but thanks. One of the previous codes placed 2 arrows in the menu, one facing left and one right. They're still there even though I removed the codes.
2 Desktops--Win 7 Ult.SP1 x64/6GB RAM /Firefox 52.9ESR/Waterfox64 2022.11/Thunderbird 52.9ESR/BitWarden PW Manager/Verizon FIOS wired network
Post Reply