MozillaZine

context menu

User Help for Mozilla Firefox
LoveMyFoxy

User avatar
 
Posts: 1990
Joined: December 11th, 2009, 11:23 am
Location: USA

Post Posted January 11th, 2018, 4:03 pm

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?
Desktop--Win 7 Ult. 64-bit, 6GB RAM /FF 52ESR 64/ Thunderbird 52 / MS Sec. Essent./ Windows firewall / Verizon FIOS

pokeefe0001
 
Posts: 72
Joined: January 18th, 2010, 4:25 pm
Location: Pacific Northwest, USA

Post Posted January 11th, 2018, 8:08 pm

Prior to FF 57 the add-on Menu Wizard would do that. Now wanting to reorder the context menu is unthinkable.
Patrick O'Keefe
Win10 x64 Pro, FF 57.0.4 TB 52.1.1

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

Post Posted January 12th, 2018, 3:50 am

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

smsmith
Moderator

User avatar
 
Posts: 19542
Joined: December 7th, 2004, 8:51 pm
Location: Indiana

Post Posted January 12th, 2018, 7:45 am

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: 72
Joined: January 18th, 2010, 4:25 pm
Location: Pacific Northwest, USA

Post Posted January 12th, 2018, 1:42 pm

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
Win10 x64 Pro, FF 57.0.4 TB 52.1.1

LoveMyFoxy

User avatar
 
Posts: 1990
Joined: December 11th, 2009, 11:23 am
Location: USA

Post Posted January 12th, 2018, 4:08 pm

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.
Desktop--Win 7 Ult. 64-bit, 6GB RAM /FF 52ESR 64/ Thunderbird 52 / MS Sec. Essent./ Windows firewall / Verizon FIOS

Frank Lion

User avatar
 
Posts: 19643
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom

Post Posted January 12th, 2018, 4:50 pm

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?
Metal Lion latest SeaMonkey & Thunderbird Themes - Sea Monkey and Silver Sea Monkey
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)

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

Post Posted January 12th, 2018, 6:51 pm

@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/Web/CSS/-moz-box-ordinal-group

LoveMyFoxy

User avatar
 
Posts: 1990
Joined: December 11th, 2009, 11:23 am
Location: USA

Post Posted January 12th, 2018, 9:22 pm

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.
Desktop--Win 7 Ult. 64-bit, 6GB RAM /FF 52ESR 64/ Thunderbird 52 / MS Sec. Essent./ Windows firewall / Verizon FIOS

Frank Lion

User avatar
 
Posts: 19643
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom

Post Posted January 13th, 2018, 3:28 am

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.
Metal Lion latest SeaMonkey & Thunderbird Themes - Sea Monkey and Silver Sea Monkey
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)

aborix
 
Posts: 8
Joined: October 23rd, 2017, 1:23 pm

Post Posted January 13th, 2018, 9:39 am

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}

LoveMyFoxy

User avatar
 
Posts: 1990
Joined: December 11th, 2009, 11:23 am
Location: USA

Post Posted January 13th, 2018, 3:18 pm

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?
Desktop--Win 7 Ult. 64-bit, 6GB RAM /FF 52ESR 64/ Thunderbird 52 / MS Sec. Essent./ Windows firewall / Verizon FIOS

aborix
 
Posts: 8
Joined: October 23rd, 2017, 1:23 pm

Post Posted January 14th, 2018, 12:48 am

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}

LoveMyFoxy

User avatar
 
Posts: 1990
Joined: December 11th, 2009, 11:23 am
Location: USA

Post Posted January 14th, 2018, 2:14 am

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.
Desktop--Win 7 Ult. 64-bit, 6GB RAM /FF 52ESR 64/ Thunderbird 52 / MS Sec. Essent./ Windows firewall / Verizon FIOS

Return to Firefox Support


Who is online

Users browsing this forum: Bing [Bot] and 12 guests