Advertisement
NicholasSteele

CSS template for removing menu selectors;Firefox Ver. 61.0.2

Aug 11th, 2018
13,053
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 3.01 KB | None | 0 0
  1. /*Please note that names of selectors are case sensitive, please note that some context menu items use an underscore instead of a dash.
  2.  
  3. In order to remove context menu items start the userChrome CSS file with the @namespace line of code and then follow that with the names of the context menu items with commas between each item; this includes context menu selectors that have a comment block between itself and the next context menu selector. At the end of the list of context menu selectors end with this:      {display: none !important;}
  4. */
  5.  
  6. @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
  7. /*Removes Items from Tab Context Menu*/
  8. #context_reloadTab,
  9. #context_toggleMuteTab,
  10. #context_pinTab,
  11. #context_unpinTab,
  12. #context_duplicateTab,
  13. #context_openTabInWindow,
  14. #context_sendTabToDevice_separator,
  15. #context_sendTabToDevice,
  16. #context_reloadAllTabs,
  17. #context_bookmarkAllTabs,
  18. #context_closeTabsToTheEnd,
  19. #context_closeOtherTabs,
  20. #context_undoCloseTab,
  21. #context_closeTab,
  22.  
  23. /*----- Removes Separators from the Tab Context Menu. Keep in mind that for each separator below there are multiple selector ID's that I was able to identify that work. You only need to choose one in order to remove the specified separator.
  24.  
  25. 1st separator*/
  26. menuitem[label="Mute Tab"] + menuseparator,
  27. #context_toggleMuteTab+menuseparator,
  28.  
  29. /*2nd separator*/
  30. menuitem[label="Move to New Window"] + menuseparator,
  31. #context_openTabInWindow+menuseparator,
  32.  
  33. /*3rd separator*/
  34. #context_sendTabToDevice_separator,
  35. #context_sendTabToDevice+menuseparator,
  36.  
  37. /*4th separator*/
  38. menuitem[label="Close Other Tabs"] + menuseparator,
  39. #context_closeOtherTabs+menuseparator,
  40.  
  41. /*5th separator*/
  42. menuitem[label="Close Tab"] + menuseparator,
  43. #context_closeTab+menuseparator,
  44.  
  45. /*Removes Items from Right Click Context Menu; Diagram here: https://imgur.com/b5gEfUy */
  46. #context-back,
  47. #context-forward,
  48. #context-reload,
  49. #context-stop,
  50. #context-bookmarkpage,
  51. #context-navigation,
  52. #context-sep-navigation,
  53. #context-savepage,
  54. #context-pocket,
  55. #context-sep-sendpagetodevice,
  56. #context-sendpagetodevice,
  57. #context-sep-viewbgimage,
  58. #context-viewbgimage,
  59. #context-selectall,
  60. #context-sep-selectall,
  61. #context-sep-viewsource,
  62. #context-viewsource,
  63. #context-viewinfo,
  64. #inspect-separator,
  65. #context-inspect,
  66. #contentAreaContextMenu > menuseparator:nth-child(92),
  67. #screenshots_mozilla_org_create-screenshot,
  68.  
  69. /*Removes Items from Right Click on Selected Links Context Menu; Diagram here: https://imgur.com/e9AaMx3 */
  70. #context-openlinkintab,
  71. #context-openlinkinusercontext-menu,
  72. #context-openlink,
  73. #context-openlinkprivate,
  74. #context-sep-open,
  75. #context-bookmarklink,
  76. #context-savelink,
  77. #context-savelinktopocket,
  78. #context-copylink,
  79. #context-copy,
  80. #context-sep-selectall,
  81. #context-searchselect,
  82. #context-sep-sendlinktodevice,
  83. #context-sendlinktodevice,
  84. #context-viewpartialsource-selection,
  85. #inspect-separator,
  86. #context-inspect,
  87. #contentAreaContextMenu > menuseparator:nth-child(92) /*This is a Separator*/
  88. {display: none !important;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement