stonecrusher / simpleMenuWizard

Hide contextmenu items in Firefox Photon
MIT License
385 stars 31 forks source link

organize (order) positions of menu items #7

Closed suturn123 closed 6 years ago

suturn123 commented 6 years ago

How to change the position of a context menu entries in your CSSs?

stonecrusher commented 6 years ago

This feature is not provided as it would bloat the code (which has to be edited by everyone) a lot.

You need to copy the identifiers of the elements you want to reorder and give them a position number with -moz-box-ordinal-group. Bigger number means position further at the bottom. Same number groups them together.

Example:


#tabContextMenu #context_reloadTab                 { -moz-box-ordinal-group:3 !important; }  /* Reload Tab              */
#tabContextMenu #context_toggleMuteTab             { -moz-box-ordinal-group:3 !important; }  /* Mute / Unmute Tab       */
#tabContextMenu #context_toggleMuteTab 
                                   + menuseparator { -moz-box-ordinal-group:3 !important; }  /******** Separator ********/
#tabContextMenu #context_pinTab                    { -moz-box-ordinal-group:2 !important; }  /* Pin Tab                 */
#tabContextMenu #context_unpinTab                  { -moz-box-ordinal-group:2 !important; }  /* Unpin Tab               */
#tabContextMenu #context_duplicateTab              { -moz-box-ordinal-group:2 !important; }  /* Duplicate Tab           */
#tabContextMenu #context_openTabInWindow           { -moz-box-ordinal-group:2 !important; }  /* Move to New Window      */
#tabContextMenu #context_sendTabToDevice_separator { -moz-box-ordinal-group:2 !important; }  /******** Separator ********/
#tabContextMenu #context_sendTabToDevice           { -moz-box-ordinal-group:1 !important; }  /* Send Tab to Device      */
#tabContextMenu #context_sendTabToDevice 
                                   + menuseparator { -moz-box-ordinal-group:1 !important; }  /******** Separator ********/
#tabContextMenu #context_reloadAllTabs             { -moz-box-ordinal-group:1 !important; }  /* Reload All Tabs         */
#tabContextMenu #context_bookmarkAllTabs           { -moz-box-ordinal-group:1 !important; }  /* Bookmarks All Tabs...   */
#tabContextMenu #context_closeTabsToTheEnd         { -moz-box-ordinal-group:1 !important; }  /* Close Tabs to the Right */
#tabContextMenu #context_closeOtherTabs            { -moz-box-ordinal-group:4 !important; }  /* Close Other Tabs        */
#tabContextMenu #context_closeOtherTabs 
                                   + menuseparator { -moz-box-ordinal-group:4 !important; }  /******** Separator ********/
#tabContextMenu #context_undoCloseTab              { -moz-box-ordinal-group:4 !important; }  /* Undo Close Tab          */
#tabContextMenu #context_closeTab                  { -moz-box-ordinal-group:1 !important; }  /* Close Tab               */

You can put such code below already present code of a context.css or directly into your userChrome.css.