MozillaZine

Hide several context menu items

User Help for Mozilla Firefox
LonelyPixel

User avatar
 
Posts: 205
Joined: November 10th, 2003, 2:51 pm
Location: Germany

Post Posted October 13th, 2017, 2:17 pm

I'm using the userChrome.css file to customise the Firefox GUI and remove some unnecessary clutter. That includes a lot of context menu items I'll never use. I've already found the IDs for "Send page to device" and "Send link to device", including their separators. But can somebody please tell me the IDs for "Send tab to device" and "Take screenshot"? (Not sure about these names, I have them in German.)

This is what I've got so far:

Code: Select all
#context-openlink,   /* Open link in a new window */
#context-bookmarklink,   /* Add bookmark for this link */
#context-sendlink,   /* Send link */
#context-sendimage,   /* Send image */
#context-setDesktopBackground,   /* Set image as desktop background */
/* ... */
#contentAreaContextMenu #context-sendpagetodevice,   /* Send page to device */
#contentAreaContextMenu #context-sep-sendpagetodevice,   /* Send page to device - separator */
#contentAreaContextMenu #context-sendlinktodevice,   /* Send link to device */
#contentAreaContextMenu #context-sep-sendlinktodevice   /* Send link to device - separator */
{
   display: none !important;
}


Guesswork didn't help.

MarkRH

User avatar
 
Posts: 1252
Joined: September 12th, 2007, 2:30 am
Location: Oklahoma City, OK

Post Posted October 13th, 2017, 5:26 pm

Here's what I got for 57:
Code: Select all
/*
 * Remove "Send Page to Device", "Send Link to Device",
 * "Send Tab to Device" from context menu.
 *
 * Contributor(s): PilzAdam
 * https://github.com/Timvde/UserChrome-Tweaks/blob/master/context-menu/remove-send-to-device.css
 */
 
#context-sendpagetodevice, #context-sep-sendpagetodevice,
#context-sendlinktodevice, #context-sep-sendlinktodevice,
#context_sendTabToDevice, #context_sendTabToDevice_separator {
  display: none !important;
}
 


For the screenshot, I just disabled it in about:config, set extensions.screenshots.disabled to true.

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

Post Posted October 13th, 2017, 5:45 pm

Omit.
Last edited by morat on October 14th, 2017, 11:02 am, edited 1 time in total.

LonelyPixel

User avatar
 
Posts: 205
Joined: November 10th, 2003, 2:51 pm
Location: Germany

Post Posted October 14th, 2017, 9:48 am

The scratchpad thing doesn't work. It gives me:

Exception: TypeError: document.getElementsByAttribute is not a function
@Scratchpad/1:10:7

LonelyPixel

User avatar
 
Posts: 205
Joined: November 10th, 2003, 2:51 pm
Location: Germany

Post Posted October 14th, 2017, 9:51 am

The CSS selector of MarkRH works in Firefox 56. Thank you!

But I didn't want to disable the screenshots feature altogether yet. It has already been useful once. I just don't want it in the page context menu, the main menu tile is enough for me. (I moved the toolbar button into the menu.)

Return to Firefox Support


Who is online

Users browsing this forum: Google [Bot] and 15 guests