-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Page context menu] CSS for removing items (share code here) #76
Comments
There are about 94 items inside that context menu, if you count menuitems, menus and separators (excluding installed add-ons). The mentioned list only covers the parts for "page context" and "link context" and misses the rest: media/video, images, marked text etc. |
Aris is right, it covers just roughly 1/3 of the menu items available. Maybe we could provide the link to the tutorial on "Other projects"? If the reddit post is not updated, I'm seriously thinking about opening that as GitHub project, providing a rudimental substitute for MenuWizard addon. editOn the other hand, we already have /* edit target file to select which items to hide ***********************************************/
@import url(./css/tabs/tab_context_menuitems_visibility.css); /**/ and @import url(./css/generalui/send_to_device_menuitems_hidden.css); /**/ and @import url(./css/toolbars/toolbar_context_menuitems_visibility.css); /**/ in this project. |
The first and third are basically ports of CTR options. The second one is there, because its a stupid Firefox issue to show this item when sync is not used. A file to manage all 94 entries of page context menu would be 580 lines long. I doubt anybody would like to go through that amount of code to just find a specific item. |
Of course it will be divided in blank context menu, link context menu, image context menu, video context menu and so on. |
Feel free to create those files. |
For sure it's not complete (e.g. I couldn't reach any dictionary and spellchecking related context menus) but should be enough for the moment to cover most of the possible items. Feel free to copy and adapt. |
@stonecrusher Possible hide disactive options (gray " |
@userOperaFF Yes, I've made an update to simpleMenuWizard. But in this case, it's actually just one line in userChrome.css to hide all disabled items: #mainPopupSet menuitem[disabled="true"] { display: none !important; } |
I don't know where you have those separators from. Between Inspect Element and Block element is just one separator for me and no further item. From the sourcecode the only things that might be in between are #context-media-eme-separator,
#context-media-eme-learnmore /* Learn more about DRM... */
{ display:none !important; } You can try that code, see if it helps. I guess both uBlock and bitwarden add a separator. |
</menupopup>
<!-- (...) -->
<menuitem id="context-inspect" label="Inspect element" accesskey="t" oncommand="gContextMenu.inspectNode();"/>
<menuseparator id="context-media-eme-separator" hidden="true"/>
<menuitem id="context-media-eme-learnmore" class="menuitem-iconic" hidden="true" label="Learn more about DRM…" accesskey="D" oncommand="gContextMenu.drmLearnMore(event);" onclick="checkForMiddleClick(this, event);"/><menuseparator/>
<!-- (GUILTY!) -->
<menuseparator id="_479f0278-2c34-4365-b9f0-1d328d0f0a40__separator" image="moz-extension://702e6c72-3483-4e50-b172-ffa1856450e9/data/icons/48.png"/>
<!-- (GUILTY!) -->
<menuitem label="Take Screenshot" id="screenshots_mozilla_org_create-screenshot"/>
<menuitem label="Block element" id="ublock0_raymondhill_net_uBlock0-blockElement" class="menuitem-iconic" image="moz-extension://a826dd0a-4b47-4a4c-8719-9e5a6c5e5378/img/ublock.svg"/>
</menupopup> Bug with https://addons.mozilla.org/en-US/firefox/addon/javascript-toggler/ individual CSS for sesion installed addon:#_479f0278-2c34-4365-b9f0-1d328d0f0a40__separator { display:none !important; } ...and gone. This is easier than to spend. |
There is a cool manual to remove waste items from context menus: https://www.reddit.com/r/firefox/comments/7dvtw0/guide_how_to_edit_your_context_menu/
Could you include this to your project?
And thank you so much for your custom css! This is why i returned to FF.
The text was updated successfully, but these errors were encountered: