Advertisement
Guest User

Userchrome.css

a guest
Aug 7th, 2023
486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 13.15 KB | Software | 0 0
  1. /*AGENT_SHEET*/
  2.  
  3. /************************************/
  4. /****** simpleMenuWizard START ******/
  5.  
  6. /**********************************************
  7.    Modify these files themselves to your needs.
  8.    Do not modify the following @import block.
  9.    **********************************************/
  10.  
  11. /*** When right-clicking on... ***/
  12. @import url("./simpleMenuWizard/blank-context.css");      /* ...a blank area on a webpage                    */
  13. @import url("./simpleMenuWizard/frame-context.css");      /* ...an iframe                                    */
  14. @import url("./simpleMenuWizard/image-context.css");      /* ...an image                                     */
  15. @import url("./simpleMenuWizard/input-context.css");      /* ...an input-field                               */
  16. @import url("./simpleMenuWizard/link-context.css");       /* ...a link                                       */
  17. @import url("./simpleMenuWizard/main-hamburger.css");     /* Leftclick the hamburger menu on top right       */
  18. @import url("./simpleMenuWizard/main-menubar.css");       /* Leftclick on main menubar (open with ALT key)   */
  19. @import url("./simpleMenuWizard/newtab-containers.css");  /* ...the plus sign to open a new tab or container */
  20. @import url("./simpleMenuWizard/media-context.css");      /* ...media like audio or html5 video              */
  21. @import url("./simpleMenuWizard/select-context.css");     /* ...selected text or selected object             */
  22. @import url("./simpleMenuWizard/sidebar-context.css");    /* ...items in bookmarks- or history sidebar       */
  23. @import url("./simpleMenuWizard/sidebar-header.css");     /* Leftclick on sidebar header                     */
  24. @import url("./simpleMenuWizard/source-context.css");     /* ...a blank area when viewing source code        */
  25. @import url("./simpleMenuWizard/tab-context.css");        /* ...a tab                                        */
  26. @import url("./simpleMenuWizard/toolbar-context.css");    /* ...the toolbar or tabbar                        */
  27. @import url("./simpleMenuWizard/urlbar-context.css");     /* ...the addressbar                               */
  28. @import url("./simpleMenuWizard/urlbar-pageaction.css");  /* Leftclick the addressbar ellipsis (three dots)  */
  29.  
  30. /**********************************************************
  31.    How to activate or deactivate the following options:
  32.    Remove '/*' at the beginning of a line (not comment line) to activate the option
  33.    Add '/*' at the beginning of the line (not comment line) to deactivate the option
  34.    ********************************************************
  35.  
  36. /*** Options ***/
  37.  
  38. /*** If you don't use syncing: Hide all "Send to device" and sync items ***/
  39. @import url("./simpleMenuWizard/opt_noSync.css");
  40. /* Note: If you use Firefox 60 or higher, please see here:
  41.    https://github.com/stonecrusher/simpleMenuWizard#hide-pocket--sync--screenshots
  42. */
  43.  
  44. /*** If you use uBlock Origin and want to remove all uBO context menu entries ***/
  45. /* @import url("./simpleMenuWizard/opt_uBO.css");
  46.  
  47. /*** Hide all "Send <item> to Device" entries ***/
  48. @import url("./simpleMenuWizard/opt_noSendToDevice.css");
  49.  
  50. /*** Hide all inactive menu items ***/
  51. #mainPopupSet menuitem[disabled="true"] { display: none !important; }
  52.  
  53. /****** simpleMenuWizard end ******/
  54.  
  55. .tabbrowser-tab:not([pinned])
  56. {
  57. max-width: 200px !important;
  58. min-width: 70px !important;
  59. }
  60. .tab-content {
  61. overflow: hidden !important;
  62. }
  63. .tabbrowser-tab:not([fadein])
  64. {
  65. max-width: 1px !important;
  66. min-width: 1px !important;
  67. max-width: 1px;
  68. min-width: 1px;
  69. }
  70.  
  71. .titlebar-spacer:not([type="pre-tabs"]) {
  72.   visibility: collapse !important;
  73. }
  74.  
  75. .tabbrowser-arrowscrollbox > .scrollbutton-up,
  76. .tabbrowser-arrowscrollbox > .scrollbutton-down {
  77.   visibility: hidden !important;
  78. }
  79.  
  80. #alltabs-button {
  81.   visibility: hidden !important;
  82. }
  83.  
  84. .titlebar-spacer[type="pre-tabs"]{ margin-left: -39px}
  85. .titlebar-spacer[type="post-tabs"]{
  86. display: none
  87. width: 1px
  88. margin-right: 0px
  89. }
  90.  
  91. <?xml version="1.0"?>
  92. <!-- Copyright (c) 2017 Haggai Nuchi
  93. Available for use under the MIT License:
  94. https://opensource.org/licenses/MIT
  95.  -->
  96. <!-- modified by alice0775 2019/05/24
  97.   69.0a1  Bug 1519577 Convert toolbarbutton to a custom element
  98.  -->
  99. <!-- modified by alice0775 2019/05/22
  100.   69.0a1 Bug 1534407 - Enable browser.xhtml by default
  101.  -->
  102. <!-- modified by alice0775 2018/08/28
  103.   fix: menu would not popup.
  104.  -->
  105. <!-- modified by alice0775 2018/08/03
  106.   wirking with Sub-Script/Overlay Loader v3.0.56mod
  107.  -->
  108. <!-- modified by alice0775 2018/08/02
  109.   removed unused line.
  110.  -->
  111.  
  112.  
  113. <!-- Run userChrome.js -->
  114. <bindings xmlns="http://www.mozilla.org/xbl">
  115.   <binding id="js">
  116.     <implementation>
  117.       <constructor><![CDATA[
  118.  
  119.         if(window.userChromeJsMod) return;
  120.         window.userChromeJsMod = true;
  121.  
  122.         const file = Services.dirsvc.get('UChrm', Components.interfaces.nsIFile);
  123.         file.append('userChrome.js');
  124.  
  125.         const mFileURL = Services.io.getProtocolHandler('file')
  126.         .QueryInterface(Components.interfaces.nsIFileProtocolHandler)
  127.         .getURLSpecFromFile(file) + "?" + file.lastModifiedTime;
  128.  
  129.  
  130.         try {
  131.           Components.utils.import('resource://gre/modules/Services.jsm');
  132.  
  133.           let maybeneed = true
  134.           let enumerator = Services.wm.getEnumerator("navigator:browser");
  135.           while(enumerator.hasMoreElements()) {
  136.             var win = enumerator.getNext();
  137.             if(typeof win.userChrome_js == "object") {
  138.               maybeneed = false;
  139.               break;
  140.             }
  141.           }
  142.  
  143.           if (maybeneed) {
  144.             new class {
  145.               constructor() {
  146.                 Services.obs.addObserver(this, 'domwindowopened', false);
  147.               }
  148.  
  149.               observe(aSubject, aTopic, aData) {
  150.                 switch (aTopic) {
  151.                   case 'domwindowopened':
  152.                     aSubject.addEventListener('load', this, true);
  153.                     break;
  154.                 }
  155.               }
  156.  
  157.               handleEvent(aEvent) {
  158.                 if (!Services.appinfo.inSafeMode) {
  159.                   const document = aEvent.originalTarget;
  160.                   if (document.location
  161.                       && document.location.protocol === 'chrome:'
  162.                       && !(document.location.href == "chrome://browser/content/browser.xhtml") ) {
  163.                     try {
  164.                         console.log("chrome window opened")
  165.                         Services.scriptloader.loadSubScript(mFileURL, document.defaultView, 'UTF-8');
  166.                     } catch (ex) {
  167.                       Components.utils.reportError(ex);
  168.                     }
  169.                   }
  170.                 }
  171.               }
  172.             }();
  173.           }
  174.         } catch (exception) {
  175.           displayError(exception);
  176.         }
  177.  
  178.         if (!Services.appinfo.inSafeMode) {
  179.           try {
  180.               console.log("browser window opened")
  181.               Services.scriptloader.loadSubScript(mFileURL, document.defaultView, 'UTF-8');
  182.           } catch (ex) {
  183.             Components.utils.reportError(ex);
  184.           }
  185.         }
  186.       ]]></constructor>
  187.     </implementation>
  188.   </binding>
  189. </bindings>
  190.  
  191.  
  192. /*----------------------------------*/
  193.  
  194.  
  195.  
  196.  /* Recreates the basic functionality of the popular Roomy Bookmarks Toolbar add-on:
  197. Hide bookmarks bar items label text, show on hover. */
  198.  
  199. .bookmark-item > .toolbarbutton-text {
  200. margin-top: -1px !important;
  201. }
  202. .bookmark-item > .toolbarbutton-text {
  203. display: none !important;
  204. }
  205.  
  206. #PlacesToolbarItems > .bookmark-item > .toolbarbutton-icon[label]:not([label=""]) {
  207. margin-inline-end: 0px !important;
  208. }
  209.  
  210. /* change the icons*/
  211. /* add this to each folders you have by changing */
  212. /* the label as on this example                  */
  213. /* use SVG files lot of them on the web or use gravit.io to draw yours , it's free  for personal use */
  214.  
  215. .bookmark-item[container="true"] [label="EXACT-FOLDER-LABEL1"] {
  216.     list-style-image: url("Foldericon1.svg") !important;
  217. }
  218. .bookmark-item[container="true"] [label="JS"] {
  219.     list-style-image: url("Config.svg") !important;        
  220. }
  221. .bookmark-item[container="true"] [label="Streaming"] {
  222.     list-style-image: url("TV.svg") !important;        
  223. }
  224. .bookmark-item[container="true"] [label="Random"] {
  225.     list-style-image: url("Mario.svg") !important;        
  226. }
  227. .bookmark-item[container="true"] [label="Games"] {
  228.     list-style-image: url("Games.svg") !important;        
  229. }
  230.  
  231. /*-------------------------------------*/
  232.  
  233. /* URL bar on same level as Menu Bar */
  234. *|*:root{
  235.   --uc-navbar-height: 32px;
  236.   --uc-navbar-margin-top: 20px;
  237.   --uc-navbar-padding-right: 140px;
  238.   --uc-navbar-margin-left: 300px;
  239. }
  240.  
  241. #toolbar-menubar{
  242.   height: var(--uc-navbar-height) !important;
  243.   background-color: var(--toolbar-bgcolor) !important;
  244. }
  245.  
  246. *|*:root:not([inFullscreen="true"])
  247.  #nav-bar{
  248.   padding-right: var(--uc-navbar-padding-right) !important;
  249.   margin-top: calc(var(--uc-navbar-height) * -1.12);
  250.   margin-left: var(--uc-navbar-margin-left) !important;
  251.   background-color: transparent !important;
  252. }
  253.  
  254.  
  255. /*--------------------------------------*/
  256.  
  257.  
  258. :root {
  259.     /* delay before expanding tabs, set to '0' for no delay */
  260.     --delay: 0.1s;
  261.     --transition-time: 0.1s;
  262.     --positionX1: 45px; /* '45px' for left, '0px' for right sidebar */
  263.     --positionX2: absolute; /* 'absolute' for left, 'none' for right sidebar */
  264.     /* width of the collapsed sidebar in fullscreen mode ('1px' or '45px') */
  265.     --fullscreen-sidebar-width: 1px;
  266. }
  267.  
  268. /* Windows specific styles */
  269. @media (-moz-platform: windows),
  270.        (-moz-platform: windows-win10) {
  271.     /* Hide main tabs toolbar */
  272.     :root[tabsintitlebar]{
  273.         --uc-window-control-width: 137px; /* Space at the right of nav-bar for window controls */
  274.         /* --uc-window-drag-space-width: 24px; */  /* To add extra window drag space in nav-bar */
  275.     }
  276.  
  277.  
  278.     #back-button {
  279.         margin-top: -.5px !important;
  280.     }
  281.    
  282.     #forward-button {
  283.         margin-top: -.5px !important;
  284.     }
  285.    
  286.     #reload-button {
  287.         margin-top: -.5px !important;
  288.     }
  289.    
  290.     #PanelUI-button {
  291.         margin-top: -.5px !important;
  292.     }
  293.    
  294.     #nav-bar-overflow-button{
  295.         margin-top: -.5px !important;
  296.     }
  297.  
  298.     :root {
  299.         --uc-toolbar-height: 32px;
  300.         --chrome-content-separator-color: none !important;
  301.     }
  302.  
  303.     :root:not([uidensity="compact"]) {
  304.         --uc-toolbar-height: 32px;
  305.     }
  306.  
  307.     #TabsToolbar {
  308.         visibility: collapse !important;
  309.     }
  310.  
  311. }
  312.  
  313.  
  314. /* General styles */
  315. #browser {
  316.     position: relative;
  317. }
  318.  
  319. #sidebar-box:not([lwt-sidebar]){
  320.     appearance: unset !important;
  321. }
  322.  
  323. #sidebar-box[sidebarcommand*="tabcenter"] {
  324.     z-index: 1;
  325. }
  326.  
  327. #sidebar-box[sidebarcommand*="tabcenter"] #sidebar-header {
  328.     visibility: collapse;
  329.     display: none;
  330. }
  331.  
  332. [sidebarcommand*="tabcenter"] #sidebar,
  333. #sidebar-box[sidebarcommand*="tabcenter"] {
  334.     min-width: 45px !important;
  335.     max-width: 45px !important;
  336.     width: 45px;
  337. }
  338.  
  339. #sidebar-box[sidebarcommand*="tabcenter"]:not([hidden]) {
  340.     display: block;
  341.     position: var(--positionX2);
  342.     min-width: 45px;
  343.     max-width: 45px;
  344.     overflow: hidden;
  345.     border-right: 1px solid var(--sidebar-border-color);
  346.     z-index: 1;
  347.     top: 0;
  348.     bottom: 0;
  349. }
  350.  
  351. /* use :where() selector to lower specificity */
  352. :where(#main-window[inFullscreen]) #sidebar-box[sidebarcommand*="tabcenter"]:not([hidden]) {
  353.     min-width: var(--fullscreen-sidebar-width) !important;
  354.     max-width: var(--fullscreen-sidebar-width) !important;
  355. }
  356.  
  357. #sidebar-box[sidebarcommand*="tabcenter"]:hover #sidebar,
  358. #sidebar-box[sidebarcommand*="tabcenter"]:hover {
  359.     min-width: 10vw !important;
  360.     width: 30vw !important;
  361.     max-width: 200px !important;
  362.     z-index: 1 !important;
  363.     transition: all var(--transition-time) ease var(--delay);
  364. }
  365.  
  366. /* used for delay function */
  367. #sidebar-box[sidebarcommand*="tabcenter"]:not(:hover) #sidebar,
  368. #sidebar-box[sidebarcommand*="tabcenter"]:not(:hover) {
  369.     transition: all var(--transition-time) ease 0s;
  370. }
  371.  
  372. @media (width >= 1200px) {
  373.     #sidebar-box[sidebarcommand*="tabcenter"]:hover #sidebar,
  374.     #sidebar-box[sidebarcommand*="tabcenter"]:hover {
  375.         max-width: 250px !important;
  376.     }
  377. }
  378.  
  379. [sidebarcommand*="tabcenter"] ~ #sidebar-splitter {
  380.     display: none;
  381. }
  382.  
  383. [sidebarcommand*="tabcenter"] #sidebar {
  384.     max-height: 100%;
  385.     height: 100%;
  386. }
  387.  
  388. #main-window:not([inFullscreen]) #sidebar-box[sidebarcommand*="tabcenter"]:not([hidden]) ~ #appcontent {
  389.     margin-left: var(--positionX1);
  390. }
  391.  
  392. #main-window[inFullscreen]:not([inDOMFullscreen]) #sidebar-box[sidebarcommand*="tabcenter"]:not([hidden]) ~ #appcontent {
  393.     margin-left: var(--fullscreen-sidebar-width);
  394. }
  395.  
  396. #main-window[inFullscreen] #sidebar {
  397.     height: 100vh;
  398. }
  399.  
  400. [sidebarcommand*="tabcenter"] #sidebar-header {
  401.     background: #0C0C0D;
  402.     border-bottom: none !important;
  403. }
  404.  
  405. [sidebarcommand*="tabcenter"] ~ #sidebar-splitter {
  406.     border-right-color: #0C0C0D !important;
  407.     border-left-color: #0C0C0D !important;
  408. }
  409.  
  410. [sidebarcommand*="tabcenter"] #sidebar-switcher-target,
  411. [sidebarcommand*="tabcenter"] #sidebar-close {
  412.     filter: invert(100%);
  413. }
  414.  
  415. #nav-bar toolbarspring {
  416.     -moz-box-flex: 20 !important;
  417.     min-width: 10px !important;
  418.     max-width: 20px !important;
  419. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement