elevenhsoft / WebApps

Web applications at your fingertips.
GNU General Public License v3.0
78 stars 5 forks source link

Firefox userChrome: hide more UI elements #6

Closed boredsquirrel closed 2 months ago

boredsquirrel commented 2 months ago

Hiding more UI elements like "open x in new tab" or anything regarding bookmarks or source view will be beneficial for the minimal user experience.

as base, SimpleMenuWizard can be used

I put something together but for whatever reason adding a subdir, placing a css file there and importing it does not work. Anyways here is what I got

/************************************/
/****** simpleMenuWizard Compact******/

/***********************************************
https://github.com/stonecrusher/simpleMenuWizard
************************************************/

/*** input-context.css ***/
/*** When right-clicking on an input-field ***/

#context-sep-selectall,                 /************ Separator *************/
#context-keywordfield,                  /* Add a Keyword for this Search…   */
#inspect-separator,                     /************ Separator *************/
#context-inspect,                       /* Inspect (Q)                      */

/*** link-context.css ***/
/*** When right-clicking on a link ***/
#context-openlinkintab,                 /* Open Link in New Tab             */
#context-openlinkinusercontext-menu,    /* Open Link in New Container Tab   */
#context-openlink,                      /* Open Link in New Window          */
#context-openlinkprivate,               /* Open Link in New Private Window  */
#context-sep-open,                      /************ Separator *************/
#context-bookmarklink,                  /* Bookmark Link                    */
#context-savelinktopocket,              /* Save Link to Pocket              */
#context-sep-sendlinktodevice,          /************ Separator *************/
#context-sep-copylink,                  /************ Separator *************/
#context-searchselect,                  /* Search [Google] for "[selected]" */
#frame-sep,                             /************ Separator *************/
#context-inspect,                       /* Inspect (Q)                      */

/*** media-context.css ***/
/*** When right-clicking on media like audio or html5 video ***/
/* these are opinionated and just for debloating the menus*/

#context-media-play,                  /* Play                            */
#context-media-pause,                 /* Pause                           */
#context-video-fullscreen,            /* Full Screen                     */
#context-media-hidecontrols,          /* Hide Controls                   */
#context-media-showcontrols,          /* Show Controls                   */

#context-viewvideo,                   /* Open Video in New Tab           */

#context-sendvideo,                   /* Email Video…                    */
#context-sendaudio,                   /* Email Audio…                    */

#context-sep-setbackground,           /************ Separator ************/
#context-inspect,                     /* Inspect (Q)                     */

/*** opt_noSendToDevice.css ***/

#context-sendaudio,    /* Email Audio */
#context-sendvideo,    /* Email Video */
#context-sendimage,    /* Email Image */
#context-sendpagetodevice,
#context-sep-sendpagetodevice,
#context-sendlinktodevice,
#context-sep-sendlinktodevice,
#context_sendTabToDevice,
#context_sendTabToDevice_separator,

#pageAction-panel-sendToDevice,
/* #pageAction-panel-emailLink,    /* Email Link */

/*** select-context.css ***/
/*** When right-clicking on selected text or selected object ***/
#context-openlinkincurrent,            /* Open Link                        */
#context-print-selection,              /* Print Selection                  */
#context-sep-screenshots,              /************ Separator *************/
#context-searchselect,                 /* Search [Google] for "[selected]" */
#frame-sep,                            /************ Separator *************/
#context-viewpartialsource-selection,  /* View Selection Source            */
#context-inspect-a11y,                 /* Inspect Accessibility Properties */
#context-inspect,                      /* Inspect (Q)                      */

/*** frame-context.css ***/
/*** When right-clicking on an iframe ***/
#context-showonlythisframe,              /* Show Only This Frame     */
#context-openframeintab,                 /* Open Frame in New Tab    */
#context-openframe,                      /* Open Frame in New Window */
#context-reloadframe + menuseparator,    /******** Separator *********/
#context-bookmarkframe,                  /* Bookmark This Frame      */
#context-saveframe,                      /* Save Frame As…           */
#context-saveframe + menuseparator,      /******** Separator *********/
#context-printframe,                     /* Print Frame…             */

#context-take-frame-screenshot
                       + menuseparator,     /******** Separator *********/
#context-viewframesource,                /* View Frame Source        */
#context-viewframeinfo,                  /* View Frame Info          */

/*** image-context.css ***/
/*** When right-clicking on an image ***/
#context-viewimage,               /* Open Image in New Tab           */
#context-sep-sharing,             /************ Separator ************/
#context-inspect,                 /* Inspect (Q)                     */

/*** select-context.css ***/
/*** When right-clicking on selected text or selected object ***/
#context-openlinkincurrent,            /* Open Link                        */
#context-print-selection,              /* Print Selection                  */
#context-searchselect,                 /* Search [Google] for "[selected]" */
#frame-sep,                            /************ Separator *************/
#context-viewpartialsource-selection,  /* View Selection Source            */
#context-inspect-a11y,                 /* Inspect Accessibility Properties */
#context-inspect,                      /* Inspect (Q)                      */

/*** blank-context.css ***/
/*** When right-clicking on a blank area on a webpage ***/
#context-bookmarkpage,             /* Navi: Bookmark star icon             */
#context-savepage,               /* Save Page As...                      */
#context-pocket,                 /* Save Page to Pocket                  */
#context-viewsource,             /* View Page Source                     */
#context-inspect,                /* Inspect (Q)                          */
#context-media-eme-separator,    /************** Separator ***************/
/* Here are context menus of addons */

#leave_this_dummy_here
    { display:none !important; }
elevenhsoft commented 2 months ago

Hey,

Would be nice if you can make a new userChrome.css, put it in this directory (replace it with current): https://github.com/elevenhsoft/WebApps/tree/master/data/runtime/firefox/profile/chrome and then compile COSMIC Web Apps from source.

Just use, just ^^

just sudo just install

You need only rustup installed for cargo and other stuff: https://rustup.rs/

Are you able to test it? If you will be fine with the result, I'm go check it and we can introduce it.

I did not bother with those stuff yet since there was many, many other things to improve, but since we are close let's say, first stable release, we can think about making changes to our browsers.

Thank you for your report and interest! Cheers

boredsquirrel commented 2 months ago

I open a PR and have tested in Librewolf normally, using the user.js and the userChrome.css on a new profile. It works as expected

elevenhsoft commented 2 months ago

Beautiful, thank you! :)