├── README.md
└── chrome
├── addonSearchBar.uc.js
├── download_indicator_start_from_zero.uc.js
├── downloadpanel.uc.js
├── floatingScrollbar.uc.js
├── restartButtonM.uc.js
├── restartInMenu.uc.js
├── restoreRestorePreviousSeason.uc.js
├── sidebarModoki.uc.js
├── sidebarXautohidet.uc.js
├── trimurl.uc.js
├── userChrome-files
├── addons_sidebar.css
├── icons
│ ├── arrowDown.svg
│ ├── arrowUp.svg
│ ├── cclose.svg
│ ├── identiy_icon_alt.png
│ ├── quit.svg
│ ├── restore-session.svg
│ ├── sideclosed.svg
│ └── sideopen.svg
├── icons_and_buttons.css
├── main_menu_icons_restore.css
├── maximized_mode_tweaks.css
├── normal_mode.css
├── shadow-root.as.css
├── sidebar_floating.css
├── sidebar_header_tweaks.css
├── sidebar_modoki_style.css
├── statuspanel.css
├── urlbar.css
├── vars.css
└── vertical_bookmarks_toolbar.css
├── userChrome.css
├── userContent-files
├── aboutpages
│ ├── about_pages_Darker.css
│ ├── aboutaddons
│ │ ├── about_addons_restore_buttons.as.css
│ │ ├── addonlists_colorized_button_icons_fx68.css
│ │ ├── addonlists_show_addon_version_number_fx68.css
│ │ ├── addons_manager_alternative_appearance_fx75.css
│ │ └── recentupdates_category_always_visible.css
│ ├── aboutperformance.css
│ └── list.css
├── treestyletab.css
└── treetab_animated_gradient_border.css
├── userContent.css
└── utils
├── aboutconfig
├── aboutconfig.xhtml
├── config.css
└── config.js
└── sidebarModoki
├── closed.svg
└── opened.svg
/README.md:
--------------------------------------------------------------------------------
1 |
2 | W i d e f o x
3 |
4 |
5 |
6 | With monitors getting wider and websites more compact, maximizing the browser is a waste of space.
7 | Widefox utilizes all available vertical real estate while adding extra features to your browsing experience!
8 |
9 |
10 | Preview
11 |
12 |
13 |
14 |
15 | https://user-images.githubusercontent.com/85787109/151295205-1759f832-d56a-4885-9616-f5846d012573.mp4
16 |
17 |
18 |
19 | # Features
20 |
21 |
22 | Second sidebar Plus
23 |
24 |
25 | Nothing would be possible without the script [sidebarModoki from alice0775](https://github.com/alice0775/userChrome.js/) which creates the second sidebar.
26 |
27 | Improved with an unique floating style, matching the browser theme. Giving easy access not only to your Bookmarks, Downloads and History but to your Extensions, Themes, about:performance and about:config!
28 |
29 | There are two groups of three tabs for a total of six tabs. To switch between groups either middle click on a tab or click the area above the tabs and under the urlbar.
30 |
31 |
32 |
33 |
34 |
35 | Max vertical space
36 |
37 |
38 |
39 | Navbar and sidebar width tied together leaving all the vertical space available for each webpage, urlbar will also expand on when needed.
40 |
41 |
42 |
43 | Tree Style Tab styling
44 |
45 |
46 | Restyling tabs to match the floating styling of proton redesign, adds light/dark mode awarenesses, an animated border and various other tweaks.
47 |
48 |
49 |
50 |
51 | Smart window resize
52 |
53 |
54 |
55 | Switching from/to normal/maximized window will hide/show the sidebar automatically.
56 |
57 |
58 |
59 |
60 | # Extras
61 |
62 | ## Styles
63 |
64 |
65 | Normal size window restyle
66 |
67 | One-line style with no tabs since TST is used. Complete optional you can modify sidebarXautohidet.uc.js (just uncomment some lines)
68 | to auto-hide TST completely on normal size window.
69 |
70 | File: `.\userChrome-files\normal_mode.css`
71 |
72 |
73 |
74 |
75 |
76 | Darker about:pages for dark mode users
77 |
78 |
79 | Recolours most about:pages and breaks the monochrome background.
80 |
81 | File: `.\userContent-files\aboutpages\about_pages_Darker.css`
82 |
83 | 
84 |
85 |
86 |
87 |
88 |
89 | About:addons restoration
90 |
91 |
92 | Utilize the wasted screen space, bring back buttons and other useful additions!
93 |
94 | Files at `.\userContent-files\aboutpages\aboutaddons` folder keep what you prefer.
95 | 
96 |
97 |
98 |
99 |
100 |
101 |
102 | ## Scripts
103 |
104 |
105 | About:addons search-box searches your addons
106 |
107 |
108 | Filter your extensions and themes instead of searching the store.
109 |
110 | File: `addonSearchBar.uc.js`
111 |
112 |
113 |
114 |
115 |
116 | Restart button on toolbar and main menu
117 |
118 |
119 | One click restart.
120 |
121 | Files : `restartButtonM.uc.js`
122 | and `restartInMenu.uc.js`
123 |
124 |
125 |
126 |
127 | Restore the restore previous season on the main menu
128 |
129 |
130 | Proton redesign took it away now you can have it back.
131 |
132 | File: `restoreRestorePreviousSeason.uc.js`
133 |
134 |
135 |
136 |
137 | Show only domain on urlbar
138 |
139 |
140 | Hide and restore on focus. Use with caution.
141 |
142 | File: `trimurl.uc.js`
143 |
144 |
145 |
146 |
147 | Floating scrollbars
148 |
149 |
150 | File: `floatingScrollbar.uc.js`
151 |
152 |
153 |
154 |
155 |
156 | # Installation
157 |
158 | #### 1. Install [Tree Style Tab](https://addons.mozilla.org/en-US/firefox/addon/tree-style-tab/)
159 |
160 | + Select left side style from TST Options-> Appearance
161 | + Click the sidebar header and select `Move Sidebar to Right`
162 |
163 | #### 2. Install [TST Colored Tabs](https://addons.mozilla.org/en-US/firefox/addon/tst-colored-tabs/) to get per domain colours
164 |
165 | + In options select `Saturation 60` and `Lightness 22` and then add your preferred colours for each domain or leave it to random if you want.
166 |
167 | #### 3. Unlock custom css settings
168 |
169 | + Go to `about:config` search for `toolkit.legacyUserProfileCustomizations.stylesheets` and set it to `true`
170 | + For blur support search for `layout.css.backdrop-filter.enabled` and set it to `true` ! Not working in latest version of Firefox !
171 |
172 | #### 4. Enable script support
173 |
174 | + In-order to support custom scripts an autoconfig script loader is needed.
175 | Tested with the loader from xiaoxiaoflood. Follow the instructions to install the loader from https://github.com/xiaoxiaoflood/firefox-scripts
176 |
177 | #### 5. Install Widefox
178 |
179 | + Copy the contents of the chrome folder from this repository to the chrome folder you created inside your profile folder in step 4.
180 | + Restart!
181 | + If there is a thin line at the top of the window in maximized mode or a part of the window disapears, increase/decrease the value of the variable `--titlebar-hide` in the file `userChrome-files/vars.css`
182 |
183 | #### 6. Customize Toolbar
184 |
185 |
186 | Right click on any toolbar and select Customize Toolbar... or from Main menu > More Tools > Customize toolbar...
187 | Click here for more details...
188 |
189 | Make sure there is one spacer on the left side of urlbar and none on the right. Move the sidebar Modoki hide/show button to the vertical toolbar, move the reload and restart buttons where you want.
190 | Move extensions and other buttons from either side of urlbar to the vertical toolbar or to overflow menu. Make sure there is at least one thing inside the overflow menu. If you want the zoom control buttons you can bring them to the vertical toolbar. Compact mode is recommended, enable browser.compactmode.show in about:config and set density to compact.
191 |
192 | Here is a before and after from a default profile:
193 |
194 | 
195 |
196 |
197 |
198 |
199 | #### 7. Finished!
200 |
201 | ***[Startpage/Newtab page in preview](https://github.com/ATechnocratis/startpage)***
202 | ***[Color theme in preview](https://color.firefox.com/?theme=XQAAAAKrAgAAAAAAAABBqYhm849SCicxcUHkAiuG_ebZUZXOFqjoMxYxH1I399RoYhLPFxFUZ2RLx76huC8RZdnpkgq9ftnN-MxORpV41V06q3JQETrJWTgmmEysn0ompgQX-1ZNd4hcrAlg-LVmQIO2A4JBc0f8tLYj73YwPdB9hkwDe3RQhx-DhsW-_eRXXk-HtL51GRTrfpzHHqIvNAVS80C9Upp7zJPUl9MWA9SIpt494n2U9p9p7Cc3R_l1bOOoZE37Ls1N0cL5XRbdn3WdRUjjrd6kYwzrdPB970LCx_akrxV3lbd7zLd51WxRkapHcSOrSnMcnfWlra0tscr-SBNK8J7yeK0jjISduFJF6rUNixYGDbHeG_5m3boqJX7tokp23h5raQFBeQAYfGxwFjwzBlUs_N3BHZSJVa7UNGO1KcifeElIoHA_uGJuCG7TssZppQY8prg-h3U6ScxWF5KZsR4wQltETzI9mwW2OxdC0vMj9lCOb9wslQ6jScqy2LHaNC-u_I2ka03VnWRLO-EgTFiXl3sEb_jmyIw)***
203 |
204 |
205 |
206 |
207 |
208 |
--------------------------------------------------------------------------------
/chrome/addonSearchBar.uc.js:
--------------------------------------------------------------------------------
1 | /* Original author jotted , updated to implement live search*/
2 |
3 | UC.searchInstalledAddons = {
4 | init(){
5 | Services.obs.addObserver(UC.searchInstalledAddons.observer, "EM-loaded");
6 | },
7 | observer(window){
8 | const sa = window.document.querySelector('search-addons');
9 | if (!sa) throw new Error(`[searchInstalledAddons] addon search field not found!`);
10 | sa.searchAddons = function(query = ""){
11 | query = query.trim();
12 | const needle = new RegExp(query,"i");
13 | for (const card of window.document.querySelectorAll('addon-card')){
14 | const haystack = Array.from(card.querySelectorAll('.addon-name,.addon-description')).
15 | map(el=>el.textContent.trim()).
16 | join();
17 | card.hidden = query && !needle.test(haystack);
18 | }
19 | }
20 | sa.input.placeholder = "Search add-ons";
21 | sa.previousElementSibling.textContent = "Find your add-ons";
22 |
23 | /*My addition for live search*/
24 | sa.addEventListener('input', (event) => {
25 | sa.searchAddons(query = sa.input.value);
26 | });
27 | },
28 | destroy(){
29 | Services.obs.removeObserver(UC.searchInstalledAddons.observer, "EM-loaded");
30 | },
31 | }
32 | UC.searchInstalledAddons.init();
--------------------------------------------------------------------------------
/chrome/download_indicator_start_from_zero.uc.js:
--------------------------------------------------------------------------------
1 | Object.defineProperty(DownloadsIndicatorView,"percentComplete",{ set(aValue) {
2 |
3 | if (!this._operational) {
4 | return;
5 | }
6 | aValue = Math.min(100, aValue);
7 | if (this._percentComplete !== aValue) {
8 | // Initial progress may fire before the start event gets to us.
9 | // To avoid flashing, trip the start event first.
10 | if (this._percentComplete < 0 && aValue >= 0) {
11 | this.showEventNotification("start");
12 | }
13 | this._percentComplete = aValue;
14 | this._refreshAttention();
15 | if (this._progressRaf) {
16 | cancelAnimationFrame(this._progressRaf);
17 | delete this._progressRaf;
18 | }
19 | this._progressRaf = requestAnimationFrame(() => {
20 | // indeterminate downloads (unknown content-length) will show up as aValue = 0
21 | if (this._percentComplete >= 0) {
22 | this.indicator.setAttribute("progress", "true");
23 | // For arrow type only: Set the % complete on the pie-chart.
24 | // We use a minimum of 5% to ensure something is always visible
25 | this.indicator.style.setProperty(
26 | "--download-progress-pcent",
27 | `${Math.max(0, this._percentComplete)}%`
28 | );
29 | } else {
30 | this.indicator.removeAttribute("progress");
31 | this.indicator.style.setProperty("--download-progress-pcent", "0%");
32 | }
33 | });
34 | }
35 |
36 |
37 | }})
38 |
39 |
--------------------------------------------------------------------------------
/chrome/downloadpanel.uc.js:
--------------------------------------------------------------------------------
1 | // Open sidebarModoki download panel instead of default panel
2 |
3 | (async function () {
4 |
5 | async function init() {
6 | DownloadsCommon.getData(window)._notifyDownloadEvent = function (aType) {
7 | DownloadsCommon.log(
8 | "Attempting to notify that a new download has started or finished."
9 | );
10 |
11 | // Show the panel in the most recent browser window, if present.
12 | let browserWin = BrowserWindowTracker.getTopWindow({
13 | private: this._isPrivate,
14 | });
15 | if (!browserWin) {
16 | return;
17 | }
18 |
19 | let shouldOpenDownloadsPanel =
20 | aType == "start" &&
21 | Services.prefs.getBoolPref(
22 | "browser.download.improvements_to_download_panel"
23 | ) &&
24 | DownloadsCommon.summarizeDownloads(this._downloads).numDownloading <= 1;
25 |
26 | if (
27 | this.panelHasShownBefore &&
28 | aType != "error" &&
29 | !shouldOpenDownloadsPanel
30 | ) {
31 | // For new downloads after the first one, don't show the panel
32 | // automatically, but provide a visible notification in the topmost
33 | // browser window, if the status indicator is already visible.
34 | DownloadsCommon.log("Showing new download notification.");
35 | browserWin.DownloadsIndicatorView.showEventNotification(aType);
36 | return;
37 | }
38 | this.panelHasShownBefore = true;
39 | // browserWin.DownloadsPanel.showPanel();
40 | width = SidebarModoki.getPref(SidebarModoki.kSM_lastSelectedTabWidth + 1, "int", SidebarModoki.SM_WIDTH);
41 | document.getElementById("SM_toolbox").width = width;
42 | document.getElementById("SM_tabs").selectedIndex = 1;
43 | document.getElementById("SM_tab1-browser").contentDocument.getElementById("downloadsListBox").firstChild.click();
44 | };
45 |
46 |
47 | }
48 |
49 | if (gBrowserInit.delayedStartupFinished) {
50 | init();
51 | } else {
52 | let delayedListener = (subject, topic) => {
53 | if (topic == "browser-delayed-startup-finished" && subject == window) {
54 | Services.obs.removeObserver(delayedListener, topic);
55 | init();
56 | }
57 | };
58 | Services.obs.addObserver(delayedListener, "browser-delayed-startup-finished");
59 | }
60 | })();
61 |
--------------------------------------------------------------------------------
/chrome/floatingScrollbar.uc.js:
--------------------------------------------------------------------------------
1 | //Original source https://github.com/Endor8/userChrome.js/blob/master/floatingscrollbar/FloatingScrollbar.uc.js
2 |
3 | (function() {
4 | var css = `
5 |
6 | :not(select):not(hbox) > scrollbar {
7 | -moz-appearance: none!important;
8 | position: relative;
9 | background-color: transparent;
10 | background-image: none;
11 | z-index: 2147483647;
12 | }
13 | :not(select):not(hbox) > scrollbar[orient = "vertical"] {
14 | -moz-margin-start: -12px;
15 | min-width: 12px;
16 | max-width: 12px;
17 | }
18 | :not(select):not(hbox) > scrollbar[orient = "vertical"] thumb {
19 | border-right: 2px solid rgba(93, 72, 91, 0.5);
20 | border-radius: 0px;
21 | transition: border 0.3s ease-in;
22 | min-height: 9px;
23 | max-height: 9px;
24 | min-height: 20px;
25 | }
26 | :not(select):not(hbox) > scrollbar[orient = "horizontal"] {
27 | height: 12px!important;
28 | margin-top: -12px;
29 | }
30 | :not(select):not(hbox) > scrollbar[orient = "horizontal"] thumb {
31 | border-bottom:2px solid rgba(93, 72, 91, 0.5);
32 | transition: border 0.3s ease-in;
33 | border-radius: 0px;
34 |
35 | }
36 | :not(select):not(hbox) > scrollbar thumb {
37 |
38 | -moz-appearance: none!important;
39 | -webkit-transform-style: preserve-3d;
40 | -webkit-backface-visibility: hidden;
41 | pointer-events: auto;
42 | background-color: transparent;
43 | }
44 | :not(select):not(hbox) > scrollbar:hover thumb {
45 | -webkit-transform-style: preserve-3d;
46 | -webkit-backface-visibility: hidden;
47 | border-width: 13px;
48 | border-color:rgba(93, 72, 91, 0.8);
49 | transition: border 0s linear;
50 | border-radius: 3px!important;
51 |
52 | }
53 | :not(select):not(hbox) > scrollbar thumb:active {
54 | border-radius: 3px!important;
55 | border-width: 17px;
56 | border-color:rgba(103, 72, 91, 1);
57 | transition: border 0s linear;
58 | -webkit-transform-style: preserve-3d;
59 | -webkit-backface-visibility: hidden;
60 |
61 | }
62 | :not(select):not(hbox) > scrollbar scrollbarbutton, :not(select):not(hbox) > scrollbar gripper {
63 | display: none;
64 | }
65 | `,
66 | sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService),
67 | uri = makeURI('data:text/css;charset=UTF=8,' + encodeURIComponent(css));
68 | sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
69 | })();
--------------------------------------------------------------------------------
/chrome/restartButtonM.uc.js:
--------------------------------------------------------------------------------
1 | //Restart button on toolbar //
2 |
3 | (function() {
4 |
5 | if (location != 'chrome://browser/content/browser.xhtml') return;
6 |
7 | try {
8 | CustomizableUI.createWidget({
9 | id: 'restart-button2a',
10 | type: 'custom',
11 | defaultArea: CustomizableUI.AREA_NAVBAR,
12 | onBuild: function(aDocument) {
13 | var toolbaritem = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton');
14 | var props = {
15 | id: 'restart-button2a',
16 | class: 'toolbarbutton-1',
17 | label: 'Restart',
18 | tooltiptext: 'Restart',
19 | style: 'list-style-image: url("chrome://global/skin/icons/reload.svg");transform: rotateY(180deg);',
20 | onclick: 'if (event.button == 0) { \
21 | Services.startup.quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit); \
22 | }; \
23 | if (event.button == 1 || event.button == 2) { \
24 | Services.appinfo.invalidateCachesOnRestart(); \
25 | Services.startup.quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit); \
26 | };'
27 | };
28 | for (var p in props)
29 | toolbaritem.setAttribute(p, props[p]);
30 | return toolbaritem;
31 | }
32 | });
33 | } catch(e) { };
34 |
35 | })();
--------------------------------------------------------------------------------
/chrome/restartInMenu.uc.js:
--------------------------------------------------------------------------------
1 | // Restart item script for Firefox 60+ by Aris
2 | //
3 | // left-click on restart item: normal restart
4 | // middle-click on restart item: restart + clear caches
5 | // right-click on restart item: no special function
6 | //
7 | // based on 'addRestartButton.uc.js' script by Alice0775
8 | // https://github.com/alice0775/userChrome.js/
9 | // restart code from Classic Theme Restorer add-on
10 | // invalidate caches from Session Saver add-on
11 |
12 | var {Services} = Components.utils.import("resource://gre/modules/Services.jsm", {});
13 | var appversion = parseInt(Services.appinfo.version);
14 |
15 | var RestartMenuFileAppItems = {
16 | init: function() {
17 |
18 | var button_label = "Restart";
19 |
20 | try {
21 | switch (document.getElementById("nav-bar").getAttribute("aria-label")) {
22 | case "Navigations-Symbolleiste": button_label = "Neustarten"; break;
23 | case "Панель навигации": button_label = "Перезапустить"; break;
24 | }
25 | } catch(e) {}
26 |
27 |
28 |
29 | try {
30 | if(appversion <= 62) restartitem_appmenu = document.createElement("toolbarbutton");
31 | else restartitem_appmenu = document.createXULElement("toolbarbutton");
32 | restartitem_appmenu.setAttribute("label", button_label);
33 | restartitem_appmenu.setAttribute("id","appMenu-restart-button");
34 | restartitem_appmenu.setAttribute("class","subviewbutton subviewbutton-nav");
35 | restartitem_appmenu.setAttribute("key", "R");
36 | restartitem_appmenu.setAttribute("insertbefore", "appMenu-quit-button");
37 | restartitem_appmenu.setAttribute("onclick", "if (event.button == 0) {RestartMenuFileAppItems.restartApp(false);} else if (event.button == 1) {RestartMenuFileAppItems.restartApp(true)};");
38 | restartitem_appmenu.setAttribute("oncommand", "RestartMenuFileAppItems.restartApp(false);");
39 |
40 | var appMenuquitbutton = document.querySelector("#appMenu-viewCache")?.content.querySelector("#appMenu-quit-button2") || document.querySelector("#appMenu-quit-button2");
41 | appMenuquitbutton.before(restartitem_appmenu);
42 |
43 | /*if(document.getElementById("appMenu-quit-button").previousSibling.id != "appMenu-restart-button" )
44 | document.getElementById("appMenu-quit-button").parentNode.insertBefore(restartitem_appmenu,document.getElementById("appMenu-quit-button"));*/
45 | } catch(e) {}
46 |
47 | var sss = Components.classes["@mozilla.org/content/style-sheet-service;1"].getService(Components.interfaces.nsIStyleSheetService);
48 |
49 | // Style the icons (button/menu)
50 | var uri = Services.io.newURI("data:text/css;charset=utf-8," + encodeURIComponent('\
51 | \
52 | #fileMenu-restart-item { \
53 | list-style-image: url("chrome://global/skin/icons/reload.svg") !important; /* File Menu Entry */ \
54 | } \
55 | #fileMenu-restart-item > hbox > image.menu-iconic-icon { /* Style the menuItem */ \
56 | margin-inline-start: 2px; \
57 | margin-top: 2px; \
58 | -moz-context-properties: fill; \
59 | transform: scaleX(-1); \
60 | } \
61 | #appMenu-restart-button { \
62 | list-style-image: url("chrome://global/skin/icons/reload.svg"); /* Button in appMenu */ \
63 | } \
64 | #appMenu-restart-button .toolbarbutton-icon { /* Style the Button */ \
65 | transform: scaleX(-1); /* Icon mirroring */ \
66 | color: red; /* Icon color name */ \
67 | } \
68 | #main-window:-moz-lwtheme:-moz-lwtheme-brighttext #appMenu-restart-button .toolbarbutton-icon { \
69 | color: unset; /* in dark mode do not color the icon in the hamburger menu as red does not look very good over dark grey */ \
70 | } \
71 | \
72 | '), null, null);
73 |
74 | sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
75 |
76 | },
77 |
78 | restartApp: function(clearcaches) {
79 |
80 | var cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"].createInstance(Components.interfaces.nsISupportsPRBool);
81 | var observerSvc = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
82 |
83 | if(clearcaches) {
84 | Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).invalidateCachesOnRestart();
85 | }
86 |
87 | observerSvc.notifyObservers(cancelQuit, "quit-application-requested", "restart");
88 |
89 | if(cancelQuit.data) return false;
90 |
91 | Services.startup.quit(Services.startup.eRestart | Services.startup.eAttemptQuit);
92 |
93 | }
94 |
95 | }
96 |
97 | RestartMenuFileAppItems.init();
--------------------------------------------------------------------------------
/chrome/restoreRestorePreviousSeason.uc.js:
--------------------------------------------------------------------------------
1 | // Restore Restore Previous Session in menu
2 | var {Services} = Components.utils.import("resource://gre/modules/Services.jsm", {});
3 |
4 | var {SessionStore} = Components.utils.import("resource:///modules/sessionstore/SessionStore.jsm", {});
5 |
6 | var RestoreLastSessionMenuRestorer = {
7 | init: function() {
8 |
9 | try {
10 |
11 | restoresession_appmenu = document.createXULElement("toolbarbutton");
12 | restoresession_appmenu.setAttribute("label", "Restore Previous Session");
13 | restoresession_appmenu.setAttribute("id","appMenu-RestoreLastSession-button");
14 | restoresession_appmenu.setAttribute("class","subviewbutton");
15 | restoresession_appmenu.setAttribute("key", "Shift+P");
16 | restoresession_appmenu.setAttribute("oncommand", "RestoreLastSessionMenuRestorer.restoreAndDisable();");
17 | var appMenuSep = document.querySelector("#appMenu-viewCache")?.content.querySelector("#appMenu-new-private-window-button2").nextSibling || document.querySelector("#appMenu-new-private-window-button2").nextSibling;
18 | appMenuSep.before(restoresession_appmenu);
19 |
20 | } catch(e) {}
21 |
22 | },
23 |
24 | restoreAndDisable: function() {
25 | if(SessionStore.canRestoreLastSession){
26 | SessionStore.restoreLastSession();
27 | }
28 | let mybutt= document.getElementById("appMenu-RestoreLastSession-button")
29 | mybutt.setAttribute("disabled", "true");
30 |
31 | }
32 |
33 | }
34 |
35 | RestoreLastSessionMenuRestorer.init();
36 |
--------------------------------------------------------------------------------
/chrome/sidebarModoki.uc.js:
--------------------------------------------------------------------------------
1 | // ==UserScript==
2 | //Source from https://github.com/alice0775/userChrome.js
3 | //Original author Alice0775
4 | //Updates at https://github.com/alice0775/userChrome.js
5 | // Added +3 extra tabs and a function to control navbar width om resize
6 | // switch by clicking the are above tabs or with middle click on tab
7 | // ==/UserScript==
8 |
9 |
10 | var appcontent = document.getElementById("appcontent");
11 | var navbarX = document.getElementById("nav-bar");
12 | var mainWindow = document.getElementById("main-window");
13 |
14 | var sheetX = document.createElement('style');
15 | document.body.appendChild(sheetX);
16 |
17 | sheetX.innerHTML =' #main-window[sizemode="maximized"] #nav-bar {max-width:300px!important;}';
18 |
19 |
20 |
21 | //Resize navbar together with resized sidebar
22 | function resizeUrlbar() {
23 | //Get sidebar width
24 | //35 is the width of vertical bookmark toolbar
25 | var sidebarWidthPlus = parseInt(getComputedStyle(document.getElementById("SM_toolbox")).width) + 35;
26 | sheetX.innerHTML =' #main-window[sizemode="maximized"] #nav-bar {max-width:' + sidebarWidthPlus + 'px!important;}';
27 | }
28 |
29 | var SidebarModoki = {
30 | // -- config --
31 | SM_RIGHT: false, // SidebarModoki position
32 | SM_WIDTH : 300,
33 | SM_AUTOHIDE : true, //F11 Fullscreen
34 | TAB_SMALL_DEFAULT_WIDTH : 300,
35 | TAB_BIG_DEFAULT_WIDTH : 420,
36 |
37 | //chrome://browser/content/places/places.xhtml
38 | TAB0_SRC : "chrome://browser/content/places/bookmarksSidebar.xhtml",
39 | TAB0_LABEL : "Bookmarks",
40 | TAB1_SRC : "chrome://browser/content/downloads/contentAreaDownloadsView.xhtml?SM",
41 | TAB1_LABEL : "Downloads",
42 | TAB2_SRC : "chrome://browser/content/places/historySidebar.xhtml",
43 | TAB2_LABEL : "History",
44 | TAB3_SRC : "about:addons",
45 | TAB3_LABEL : "Addons",
46 | TAB4_SRC : "chrome://userchromejs/content/aboutconfig/aboutconfig.xhtml",
47 | TAB4_LABEL : "Config",
48 | TAB5_SRC : "about:processes",
49 | TAB5_LABEL : "Tasks",
50 | // -- config --
51 |
52 | kSM_Open : "userChrome.SidebarModoki.Open",
53 | kSM_lastSelectedTabIndex : "userChrome.SidebarModoki.lastSelectedTabIndex",
54 | kSM_lastSelectedTabWidth : "userChrome.SidebarModoki.lastSelectedTabWidth",
55 | ToolBox: null,
56 | Button: null,
57 | get prefs(){
58 | delete this.prefs;
59 | return this.prefs = Services.prefs;
60 | },
61 |
62 | jsonToDOM: function(jsonTemplate, doc, nodes) {
63 | jsonToDOM.namespaces = {
64 | html: "http://www.w3.org/1999/xhtml",
65 | xul: "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
66 | };
67 | jsonToDOM.defaultNamespace = jsonToDOM.namespaces.xul;
68 | function jsonToDOM(jsonTemplate, doc, nodes) {
69 | function namespace(name) {
70 | var reElemNameParts = /^(?:(.*):)?(.*)$/.exec(name);
71 | return { namespace: jsonToDOM.namespaces[reElemNameParts[1]], shortName: reElemNameParts[2] };
72 | }
73 |
74 | // Note that 'elemNameOrArray' is: either the full element name (eg. [html:]div) or an array of elements in JSON notation
75 | function tag(elemNameOrArray, elemAttr) {
76 | // Array of elements? Parse each one...
77 | if (Array.isArray(elemNameOrArray)) {
78 | var frag = doc.createDocumentFragment();
79 | Array.prototype.forEach.call(arguments, function(thisElem) {
80 | frag.appendChild(tag.apply(null, thisElem));
81 | });
82 | return frag;
83 | }
84 |
85 | // Single element? Parse element namespace prefix (if none exists, default to defaultNamespace), and create element
86 | var elemNs = namespace(elemNameOrArray);
87 | var elem = doc.createElementNS(elemNs.namespace || jsonToDOM.defaultNamespace, elemNs.shortName);
88 |
89 | // Set element's attributes and/or callback functions (eg. onclick)
90 | for (var key in elemAttr) {
91 | var val = elemAttr[key];
92 | if (nodes && key == "keyvalue") { //for later convenient JavaScript access) by giving them a 'keyvalue' attribute; |nodes|.|keyvalue|
93 | nodes[val] = elem;
94 | continue;
95 | }
96 |
97 | var attrNs = namespace(key);
98 | if (typeof val == "function") {
99 | // Special case for function attributes; don't just add them as 'on...' attributes, but as events, using addEventListener
100 | elem.addEventListener(key.replace(/^on/, ""), val, false);
101 | } else {
102 | // Note that the default namespace for XML attributes is, and should be, blank (ie. they're not in any namespace)
103 | elem.setAttributeNS(attrNs.namespace || "", attrNs.shortName, val);
104 | }
105 | }
106 |
107 | // Create and append this element's children
108 | var childElems = Array.prototype.slice.call(arguments, 2);
109 | childElems.forEach(function(childElem) {
110 | if (childElem != null) {
111 | elem.appendChild(
112 | childElem instanceof doc.defaultView.Node ? childElem :
113 | Array.isArray(childElem) ? tag.apply(null, childElem) :
114 | doc.createTextNode(childElem));
115 | }
116 | });
117 | return elem;
118 | }
119 | return tag.apply(null, jsonTemplate);
120 | }
121 |
122 | return jsonToDOM(jsonTemplate, doc, nodes);
123 | },
124 |
125 | init: function() {
126 | let chromehidden = document.getElementById("main-window").hasAttribute("chromehidden");
127 | if (chromehidden &&
128 | document.getElementById("main-window").getAttribute("chromehidden").includes("extrachrome")) { return; // do nothing
129 | }
130 |
131 | let MARGINHACK = this.SM_RIGHT ? "0 0 0 0" : "0 -5px 0 0";
132 | let style = `
133 | @namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
134 | #SM_toolbox
135 | {
136 | min-width: 0;
137 | width: {SM_WIDTH}px;
138 | background-color: var(--toolbar-bgcolor);
139 | color: -moz-dialogtext;
140 | text-shadow: none;
141 | }
142 | #SM_toolbox:not(.titlebar-color) {
143 | min-width: 0;
144 | background-color: var(--toolbar-bgcolor);
145 | color: var(--toolbar-color);
146 | }
147 | /*visibility*/
148 | #SM_toolbox[collapsed],
149 | #SM_splitter[collapsed],
150 | /*フルスクリーン*/
151 | #SM_toolbox[moz-collapsed="true"],
152 | #SM_splitter[moz-collapsed="true"]
153 | {
154 | visibility:collapse;
155 | }
156 | /*ポップアップの時*/
157 | #main-window[chromehidden~="extrachrome"] #SM_toolbox,
158 | #main-window[chromehidden~="extrachrome"] #SM_splitter
159 | {
160 | visibility: collapse;
161 | }
162 |
163 | /*プリントプレビュー*/
164 | #print-preview-toolbar[printpreview="true"] + #navigator-toolbox + #browser #SM_toolbox,
165 | #print-preview-toolbar[printpreview="true"] + #navigator-toolbox + #browser #SM_splitter
166 | {
167 | visibility:collapse;
168 | }
169 | #SM_tabpanels
170 | {
171 | appearance: none !important;
172 | padding: 0;
173 | /*margin: {MARGINHACK};*//* hack*/
174 | appearance: unset;
175 | }
176 |
177 | #SM_tabs tab {
178 | appearance: none !important;
179 | }
180 | #SM_tabpanels:not(.titlebar-color) {
181 | background-color: var(--toolbar-bgcolor);
182 | color: var(--toolbar-color);
183 | }
184 | tab:focus-visible > .tab-middle {
185 | outline: none!important;
186 | }
187 | #SM_closeButton:hover{
188 | opacity:0;
189 | }
190 |
191 | #SM_Button
192 | {
193 | /* list-style-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAQ0lEQVQ4jWNgoAL4z8DA8N/AwAArTQRGFSBBI4YBDHhonC6n3AA1NTUMZ6F5gyQXYFNEsheweWnUBfRyAbmYcgMoAgBFX4a/wlDliwAAAABJRU5ErkJggg=='); */
194 | list-style-image: url("chrome://userchromejs/content/sidebarModoki/closed.svg");
195 |
196 | }
197 | #SM_Button[checked="true"]{
198 | background:none!important;
199 |
200 | /*list-style-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAANklEQVQ4jWP4TyFg+P///38GBgayMHUNwEdjdTrVDcDnTKJdgEsRSV5ACaBRF9DZBQObFygBAMeIxVdCQIJTAAAAAElFTkSuQmCC');*/
201 | list-style-image:url("chrome://userchromejs/content/sidebarModoki/opened.svg");
202 | }
203 | #SM_Button image
204 | {
205 | background:none!important;
206 | height:24px!important;
207 | }
208 | /*Sidebar panel windows controls and indicator*/
209 | #nav_button_container {
210 | position:fixed;
211 | display:inline-flex;
212 | z-index:9999;
213 | width: 70px;
214 | margin-left: -140px;
215 | transition: 0.3s ease-in;
216 | transition-property: width, height, opacity, margin;
217 | transform-origin: center;
218 | height: 3px;
219 | padding: 1px;
220 | opacity: 0.9;
221 | margin-top: 17px;
222 | border: 2px solid var(--arrowpanel-border-color);
223 | border-top-color: var(--toolbar-bgcolor);
224 | border-bottom-right-radius: 15px;
225 | border-bottom-left-radius: 15px;
226 | transition: all 0.15s ease-in-out;
227 | }
228 | .nav_button {
229 | opacity: 0;
230 | }
231 | #SM_tabbox[selectedIndex="0"] #SM_tabs>#nav_button_container {
232 | margin-left: 0px!important;
233 | }
234 | #SM_tabbox[selectedIndex="1"] #SM_tabs>#nav_button_container {
235 | margin-left: calc( 1*42px);
236 | }
237 | #SM_tabbox[selectedIndex="2"] #SM_tabs>#nav_button_container {
238 | margin-left: calc( 2*42px);
239 | }
240 | #SM_tabbox[selectedIndex="3"] #SM_tabs>#nav_button_container {
241 | margin-left: calc( 3*42px);
242 | }
243 | #SM_tabbox[selectedIndex="4"] #SM_tabs>#nav_button_container {
244 | margin-left: calc( 4*42px);
245 | }
246 | #SM_tabbox[selectedIndex="5"] #SM_tabs>#nav_button_container {
247 | margin-left: calc( 5*42px);
248 | }
249 |
250 | `;
251 |
252 | style = style.replace(/\s+/g, " ").replace(/\{SM_WIDTH\}/g, this.SM_WIDTH).replace(/\{MARGINHACK\}/g, MARGINHACK);
253 | let sspi = document.createProcessingInstruction(
254 | 'xml-stylesheet',
255 | 'type="text/css" href="data:text/css,' + encodeURIComponent(style) + '"'
256 | );
257 | document.insertBefore(sspi, document.documentElement);
258 | sspi.getAttribute = function(name) {
259 | return document.documentElement.getAttribute(name);
260 | };
261 |
262 |
263 | ChromeUtils.import("resource:///modules/CustomizableUI.jsm");
264 | // xxxx try-catch may need for 2nd window
265 | try {
266 | CustomizableUI.createWidget({ //must run createWidget before windowListener.register because the register function needs the button added first
267 | id: 'SM_Button',
268 | type: 'custom',
269 | defaultArea: CustomizableUI.AREA_NAVBAR,
270 | onBuild: function(aDocument) {
271 | var toolbaritem = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton');
272 | var props = {
273 | id: "SM_Button",
274 | class: "toolbarbutton-1 chromeclass-toolbar-additional",
275 | tooltiptext: "Sidebar Modoki",
276 | type: "button",
277 | oncommand: "SidebarModoki.buttonPress();",
278 | label: "Sidebar Modoki",
279 | removable: "true"
280 | };
281 | for (var p in props) {
282 | toolbaritem.setAttribute(p, props[p]);
283 | }
284 |
285 | return toolbaritem;
286 | }
287 | });
288 | }catch(e){}
289 |
290 | // to do, replace with MozXULElement.parseXULToFragment();
291 | let template = ["command", {id: "cmd_SidebarModoki", oncommand: "SidebarModoki.toggle()"}];
292 | document.getElementById("mainCommandSet").appendChild(this.jsonToDOM(template, document, {}));
293 |
294 | template = ["key", {id: "key_SidebarModoki", key: "B", modifiers: "accel,alt", command: "cmd_SidebarModoki",}];
295 | document.getElementById("mainKeyset").appendChild(this.jsonToDOM(template, document, {}));
296 | template =
297 | ["vbox", {id: "SM_toolbox", class: "chromeclass-extrachrome", customizable:"true", style: this.SM_RIGHT ? "-moz-box-ordinal-group:10" : "-moz-box-ordinal-group:0"},
298 | ["toolbarbutton", {id: "SM_closeButton", class: "tabbable", tooltiptext: "Switch"}],
299 | ["tabbox", {id:"SM_tabbox", flex: "1", handleCtrlPageUpDown: false, handleCtrlTab: false},
300 | ["tabs", {id: "SM_tabs" , index: this.selectedIndex},
301 | ["tab", {id: "SM_tab0", label: this.TAB0_LABEL, class: "SM_tab"}],
302 | ["tab", {id: "SM_tab1", label: this.TAB1_LABEL, class: "SM_tab"}],
303 | ["tab", {id: "SM_tab2", label: this.TAB2_LABEL, class: "SM_tab"}],
304 | ["tab", {id: "SM_tab3", label: this.TAB3_LABEL, class: "SM_tab"}],
305 | ["tab", {id: "SM_tab4", label: this.TAB4_LABEL, class: "SM_tab"}],
306 | ["tab", {id: "SM_tab5", label: this.TAB5_LABEL, class: "SM_tab"}],
307 | ["hbox", {id: "nav_button_container"}],
308 | ["toolbarbutton", {id:"downloads-button", class:"toolbarbutton-1 chromeclass-toolbar-additional", badged:"true", key:"key_openDownloads", onmousedown:"DownloadsIndicatorView.onCommand(event);", onkeypress:"DownloadsIndicatorView.onCommand(event);", ondrop:"DownloadsIndicatorView.onDrop(event);", ondragover:"DownloadsIndicatorView.onDragOver(event);", ondragenter:"DownloadsIndicatorView.onDragOver(event);", removable:"true", overflows:"false", tooltip:"dynamic-shortcut-tooltip", indicator:"true"} ,
309 | ["box", {id:"downloads-indicator-anchor", consumeanchor:"downloads-button"},
310 | ["image", {id:"downloads-indicator-icon"}]],
311 | ["box", {id:"downloads-indicator-progress-outer", class:"toolbarbutton-animatable-box"},
312 | ["box", {id:"downloads-indicator-progress-inner"}]],
313 | ["box" , {id:"downloads-indicator-start-box", class:"toolbarbutton-animatable-box" },
314 | ["image", {id:"downloads-indicator-start-image" , class:"toolbarbutton-animatable-image"}]],
315 | ["box", {id:"downloads-indicator-finish-box" , class:"toolbarbutton-animatable-box" },
316 | ["image", {id:"downloads-indicator-finish-image", class:"toolbarbutton-animatable-image"}]]
317 |
318 | ]
319 | ],
320 | ["tabpanels", {id: "SM_tabpanels", flex: "1", style: "border: none;"},
321 | ["tabpanel", {id: "SM_tab0-container", orient: "vertical", flex: "1"},
322 | ["browser", {id: "SM_tab0-browser", flex: "1", autoscroll: "false", src: this.TAB0_SRC}]
323 | ],
324 | ["tabpanel", {id: "SM_tab1-container", orient: "vertical", flex: "1"},
325 | ["browser", {id: "SM_tab1-browser", flex: "1", autoscroll: "false", src: this.TAB1_SRC}]
326 | ],
327 | ["tabpanel", {id: "SM_tab2-container", orient: "vertical", flex: "1"},
328 | ["browser", {id: "SM_tab2-browser", flex: "1", autoscroll: "false", src: this.TAB2_SRC}]
329 | ],
330 | ["tabpanel", {id: "SM_tab3-container", orient: "vertical", flex: "1"},
331 | ["browser", {id: "SM_tab3-browser", flex: "1", autoscroll: "false", src: this.TAB3_SRC}]
332 | ],
333 | ["tabpanel", {id: "SM_tab4-container", orient: "vertical", flex: "1"},
334 | ["browser", {id: "SM_tab4-browser", flex: "1", autoscroll: "false", src: this.TAB4_SRC}]
335 | ],
336 | ["tabpanel", {id: "SM_tab5-container", orient: "vertical", flex: "1"},
337 | ["browser", {id: "SM_tab5-browser", flex: "1", autoscroll: "false", src: this.TAB5_SRC}]
338 | ]
339 | ],
340 | ],
341 | ];
342 | let sidebar = document.getElementById("sidebar-box");
343 | sidebar.parentNode.insertBefore(this.jsonToDOM(template, document, {}), sidebar);
344 |
345 | template =
346 | ["splitter", {id: "SM_splitter", state: "open", collapse: this.SM_RIGHT ? "after" :"before", resizebefore:"sibling", resizeafter:"none"},
347 | ["grippy", {}]
348 | ];
349 | sidebar.parentNode.insertBefore(this.jsonToDOM(template, document, {}), sidebar);
350 |
351 | //xxx 69 hack
352 | let tabbox = document.getElementById("SM_tabbox");
353 | tabbox.handleEvent = function handleEvent(event) {
354 | if (!event.isTrusted) {
355 | // Don't let untrusted events mess with tabs.
356 | return;
357 | }
358 |
359 | // Skip this only if something has explicitly cancelled it.
360 | if (event.defaultCancelled) {
361 | return;
362 | }
363 |
364 | // Don't check if the event was already consumed because tab
365 | // navigation should always work for better user experience.
366 | let imports = {};
367 | ChromeUtils.defineModuleGetter(
368 | imports,
369 | "ShortcutUtils",
370 | "resource://gre/modules/ShortcutUtils.jsm"
371 | );
372 | const { ShortcutUtils } = imports;
373 |
374 | switch (ShortcutUtils.getSystemActionForEvent(event)) {
375 | case ShortcutUtils.CYCLE_TABS:
376 | if (this.tabs && this.handleCtrlTab) {
377 | this.tabs.advanceSelectedTab(event.shiftKey ? -1 : 1, true);
378 | event.preventDefault();
379 | }
380 | break;
381 | case ShortcutUtils.PREVIOUS_TAB:
382 | if (this.tabs && this.handleCtrlPageUpDown) {
383 | this.tabs.advanceSelectedTab(-1, true);
384 | event.preventDefault();
385 | }
386 | break;
387 | case ShortcutUtils.NEXT_TAB:
388 | if (this.tabs && this.handleCtrlPageUpDown) {
389 | this.tabs.advanceSelectedTab(1, true);
390 | event.preventDefault();
391 | }
392 | break;
393 | }
394 | };
395 |
396 | let index = document.getElementById("SM_tabpanels").selectedIndex;
397 | let tb0 = document.getElementById("SM_tab0");
398 | let tb1 = document.getElementById("SM_tab1");
399 | let tb2 = document.getElementById("SM_tab2");
400 | let tb3 = document.getElementById("SM_tab3");
401 | let tb4 = document.getElementById("SM_tab4");
402 | let tb5 = document.getElementById("SM_tab5");
403 |
404 | tb0.parentNode.insertBefore(tb0, tb1);
405 | tb0.parentNode.insertBefore(tb1, tb2);
406 | tb0.parentNode.insertBefore(tb2, tb3);
407 | tb0.parentNode.insertBefore(tb3, tb4);
408 | tb0.parentNode.insertBefore(tb4, tb5);
409 |
410 | document.getElementById("SM_tabs").selectedIndex = index;
411 | let closebutton = document.getElementById("SM_closeButton");
412 | setTimeout(function(){this.observe();}.bind(this), 0);
413 |
414 | //F11 fullscreen
415 | FullScreen.showNavToolbox_org = FullScreen.showNavToolbox;
416 | FullScreen.showNavToolbox = function(trackMouse = true) {
417 | FullScreen.showNavToolbox_org(trackMouse);
418 | if (!!SidebarModoki.ToolBox) {
419 | SidebarModoki.ToolBox.removeAttribute("moz-collapsed");
420 | SidebarModoki.Splitter.removeAttribute("moz-collapsed");
421 | }
422 | }
423 | FullScreen.hideNavToolbox_org = FullScreen.hideNavToolbox;
424 | FullScreen.hideNavToolbox = function(aAnimate = false) {
425 | FullScreen.hideNavToolbox_org(aAnimate);
426 | if (SidebarModoki.SM_AUTOHIDE && !!SidebarModoki.ToolBox) {
427 | SidebarModoki.ToolBox.setAttribute("moz-collapsed", "true");
428 | SidebarModoki.Splitter.setAttribute("moz-collapsed", "true");
429 | }
430 | }
431 |
432 | //DOM fullscreen
433 | window.addEventListener("MozDOMFullscreen:Entered", this,
434 | /* useCapture */ true,
435 | /* wantsUntrusted */ false);
436 | window.addEventListener("MozDOMFullscreen:Exited", this,
437 | /* useCapture */ true,
438 | /* wantsUntrusted */ false);
439 |
440 | },
441 |
442 |
443 | observe: function() {
444 | this.ToolBox = document.getElementById("SM_toolbox");
445 | this.Splitter = document.getElementById("SM_splitter");
446 |
447 | if (this.getPref(this.kSM_Open, "bool", true)) {
448 | this.toggle(true);
449 | } else {
450 | this.close();
451 | }
452 | document.getElementById("SM_tabs").addEventListener("focus", this, true);
453 | window.addEventListener("aftercustomization", this, false);
454 |
455 | },
456 |
457 | onSelect: function(event) {
458 | let aIndex = document.getElementById("SM_tabpanels").selectedIndex;
459 | this.prefs.setIntPref(this.kSM_lastSelectedTabIndex, aIndex);
460 | width = this.getPref(this.kSM_lastSelectedTabWidth + aIndex, "int", this.SM_WIDTH);
461 | document.getElementById("SM_toolbox").setAttribute("style", "width:" + width + "px");
462 | resizeUrlbar();
463 | },
464 |
465 | toggle: function(forceopen) {
466 | this.Button = document.getElementById("SM_Button");
467 | this.ToolBox = document.getElementById("SM_toolbox")
468 | if(this.Button){
469 | if (!this.Button.hasAttribute("checked") || forceopen) {
470 | this.Button.setAttribute("checked", true);
471 | this.ToolBox.collapsed = false;
472 | this.Splitter.collapsed= false;
473 | let index = this.getPref(this.kSM_lastSelectedTabIndex, "int", 0);
474 | document.getElementById("SM_tabs").selectedIndex = index;
475 | width = this.getPref(this.kSM_lastSelectedTabWidth + index, "int", this.SM_WIDTH);
476 | document.getElementById("SM_toolbox").setAttribute("style", "width:" + width + "px");
477 | this.prefs.setBoolPref(this.kSM_Open, true)
478 | addEventListener("resize", this, false);
479 | } else {
480 | this.close();
481 | }
482 | }
483 | },
484 | buttonPress: function() {
485 | this.prefs.setIntPref(this.kSM_lastSelectedTabWidth + 0, this.TAB_SMALL_DEFAULT_WIDTH);
486 | this.prefs.setIntPref(this.kSM_lastSelectedTabWidth + 1, this.TAB_SMALL_DEFAULT_WIDTH);
487 | this.prefs.setIntPref(this.kSM_lastSelectedTabWidth + 3, this.TAB_SMALL_DEFAULT_WIDTH);
488 | this.prefs.setIntPref(this.kSM_lastSelectedTabWidth + 2, this.TAB_SMALL_DEFAULT_WIDTH);
489 | this.prefs.setIntPref(this.kSM_lastSelectedTabWidth + 4, this.TAB_BIG_DEFAULT_WIDTH);
490 | this.prefs.setIntPref(this.kSM_lastSelectedTabWidth + 5, this.TAB_BIG_DEFAULT_WIDTH);
491 | this.toggle();
492 | },
493 | close: function() {
494 | removeEventListener("resize", this, false);
495 | this.Button = document.getElementById("SM_Button");
496 | this.Button.removeAttribute("checked");
497 | this.ToolBox.collapsed = true;
498 | this.Splitter.collapsed = true;
499 | this.prefs.setBoolPref(this.kSM_Open, false)
500 | },
501 |
502 |
503 | //ここからは, 大きさの調整
504 | onResize: function(event) {
505 | let width = this.ToolBox.getBoundingClientRect().width;
506 | let aIndex = document.getElementById("SM_tabs").selectedIndex;
507 | this.prefs.setIntPref(this.kSM_lastSelectedTabWidth + aIndex, width);
508 | resizeUrlbar();
509 | },
510 |
511 | handleEvent: function(event) {
512 | switch(event.type) {
513 | case 'focus':
514 | this.onSelect(event);
515 | break;
516 | case 'resize':
517 | this.onResize(event);
518 | break;
519 | case 'MozDOMFullscreen:Entered':
520 | if (!!this.ToolBox) {
521 | this.ToolBox.setAttribute("moz-collapsed", "true");
522 | this.Splitter.setAttribute("moz-collapsed", "true");
523 | }
524 | break;
525 | case 'MozDOMFullscreen:Exited':
526 | if (!!this.ToolBox) {
527 | this.ToolBox.removeAttribute("moz-collapsed");
528 | this.Splitter.removeAttribute("moz-collapsed");
529 | }
530 | break;
531 | case 'aftercustomization':
532 | if (this.getPref(this.kSM_Open, "bool", true)) {
533 | this.Button.setAttribute("checked", true);
534 | }
535 | break;
536 | }
537 | },
538 |
539 | //pref読み込み
540 | getPref: function(aPrefString, aPrefType, aDefault) {
541 | try{
542 | switch (aPrefType){
543 | case "str":
544 | return this.prefs.getCharPref(aPrefString).toString(); break;
545 | case "int":
546 | return this.prefs.getIntPref(aPrefString); break;
547 | case "bool":
548 | default:
549 | return this.prefs.getBoolPref(aPrefString); break;
550 | }
551 | }catch(e){
552 | }
553 | return aDefault;
554 | }
555 |
556 | }
557 |
558 | // wait until components are initialized so we can access SidebarUI
559 | if (gBrowserInit.delayedStartupFinished) {
560 | initAll();
561 | } else {
562 | let delayedListener = (subject, topic) => {
563 | if (topic == "browser-delayed-startup-finished" && subject == window) {
564 | Services.obs.removeObserver(delayedListener, topic);
565 | initAll();
566 | }
567 | };
568 | Services.obs.addObserver(delayedListener, "browser-delayed-startup-finished");
569 | }
570 |
571 | function initAll(){
572 | SidebarModoki.init();
573 | allowAddonsPageOpen();
574 | var splitter = document.getElementById("SM_splitter");
575 | // splitter.addEventListener('drag', resizeUrlbar);
576 | window.addEventListener('load',resizeUrlbar);
577 | // window.addEventListener('resize', resizeUrlbar);
578 | setTimeout(resizeUrlbar,1400);
579 | }
580 |
581 | function removeEMping(){
582 | Services.obs.removeObserver(document.getElementById("SM_tab3-browser").contentWindow.gViewController, "EM-ping");
583 | Services.obs.removeObserver(removeEMping, "EM-loaded");
584 |
585 | }
586 | function allowAddonsPageOpen() {
587 | Services.obs.addObserver(removeEMping, "EM-loaded");
588 | }
--------------------------------------------------------------------------------
/chrome/sidebarXautohidet.uc.js:
--------------------------------------------------------------------------------
1 | // AutoHide sidebarModoki on normal mode also able to hide normal sidebar too
2 | // To hide both sidebars uncomment the two! commented section bellow
3 |
4 | (function() {
5 | var sidebarbox = document.getElementById("sidebar-box");
6 | var sidebar = document.getElementById("sidebar");
7 | var sidebarbox = document.getElementById("sidebar-box");
8 | var sm_toolbox = document.getElementById("SM_toolbox");
9 | var shortccut = 0;
10 | var prvState = null;
11 |
12 | function toggleSidebars() {
13 | var width = window.innerWidth;
14 | if (window.windowState === 1 && prvState != window.windowState) {
15 | SidebarModoki.toggle(true);
16 | prvState = window.windowState;
17 | //UNCOMMENT TO HIDE BOTH SIDEBARS
18 | // if((sidebar.src === "about:blank")||(!sidebar.hasAttribute("src")))
19 | // SidebarUI.show(sidebarbox.getAttribute("sidebarcommand"));
20 | // else{
21 | // sidebarbox.checked = "true";
22 | // sidebar.checked = "true";
23 | // sidebar.setAttribute("checked", "true");
24 | // sidebarbox.setAttribute("checked", "true");
25 | // sidebarbox.setAttribute("hidden", false);
26 | // sidebarbox.hidden = false;
27 | // sidebar.hidden = false;
28 | // }
29 | } else if (prvState != window.windowState) {
30 | prvState = window.windowState;
31 | SidebarModoki.close();
32 | //UNCOMMENT TO HIDE BOTH SIDEBARS
33 | // if (sidebarbox.hidden != "true" && shortccut === 0) {
34 | // sidebarbox.hidden = "true";
35 | // }
36 | }
37 | }
38 | window.addEventListener('resize', toggleSidebars);
39 | toggleSidebars();
40 | SidebarUI.hide();
41 | })();
--------------------------------------------------------------------------------
/chrome/trimurl.uc.js:
--------------------------------------------------------------------------------
1 |
2 | BrowserUIUtils.trimURL = function trimURL(aURL) {
3 | let urlString = this.removeSingleTrailingSlashFromURL(aURL);
4 | try {
5 | const url = new URL(urlString);
6 | if (/(http|https):/.test(url.protocol)) {
7 | if (url.host.startsWith("www")) {
8 | url.host = url.host.slice(4);
9 | }
10 | return url.host;
11 | } else {
12 | return urlString;
13 | }
14 | } catch (err) {
15 | return urlString;
16 | }
17 | }
18 | XULBrowserWindow.setOverLink = function setOverLink(url) {
19 | if (url) {
20 | url = Services.textToSubURI.unEscapeURIForUI(url);
21 |
22 | // Encode bidirectional formatting characters.
23 | // (RFC 3987 sections 3.2 and 4.1 paragraph 6)
24 | url = url.replace(
25 | /[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g,
26 | encodeURIComponent
27 | );
28 | }
29 |
30 | this.overLink = url;
31 | LinkTargetDisplay.update();
32 | }
--------------------------------------------------------------------------------
/chrome/userChrome-files/addons_sidebar.css:
--------------------------------------------------------------------------------
1 | /*About:addons for sidebar stylling*/
2 |
3 | @-moz-document url-prefix(chrome://mozapps/content/extensions/extensions.xul),
4 | url-prefix(about:addons), url-prefix(chrome://mozapps/content/extensions/aboutaddons.html),
5 | url-prefix(chrome://mozapps/content/extensions/aboutaddons.xhtml) {
6 | @media (max-width: 630px) {
7 | :root {
8 | --sidebar-width: calc(var(--in-content-sidebar-width) - 82px) !important;
9 | --addon-icon-size: 20px !important;
10 | --in-content-category-background-selected: transparent !important;
11 | --card-shadow-hover: 0 0 0 3px rgba(100, 60, 140, 1) !important;
12 | }
13 | /*sidebar with categories on top*/
14 | #sidebar {
15 | transform: rotate(-90deg) !important;
16 | transform-origin: 0px 0px !important;
17 | margin-top: 45px !important;
18 | overflow: visible !important;
19 | position: relative !important;
20 | width: 50px !important;
21 | max-height: 99vw !important;
22 | min-height: 1vw !important;
23 | padding: 0 !important;
24 | }
25 | sidebar-footer {
26 | display: none !important;
27 | }
28 | #categories {
29 | margin: 0 !important;
30 | }
31 | #categories > .category {
32 | transform: rotate(90deg) !important;
33 | margin-inline-start: 0 !important;
34 | margin-inline-end: 0 !important;
35 | z-index: 10 !important;
36 |
37 | }
38 |
39 | #page-header {
40 | background: none !important;
41 | }
42 | .spacer {
43 | display: none !important;
44 | }
45 |
46 | /*Only keep page options and search from main heading*/
47 |
48 | .sticky-container {
49 | display: flex !important;
50 | max-width: 110vw !important;
51 | min-width: 0 !important;
52 | margin-top: 40px !important;
53 | margin-right: 0 !important;
54 | }
55 | .main-heading {
56 | padding: 0 !important;
57 | margin: 0 !important;
58 | }
59 | #updates-message, .header-name ,.main-heading > .back-button, .search-label{
60 | display: none !important;
61 | }
62 | .page-options-menu > .more-options-button {
63 | padding: 0 !important;
64 | margin: 0 !important;
65 | max-height: 30px !important;
66 | margin-inline-start: 0px !important;
67 | }
68 | .main-search {
69 | display: block !important;
70 | padding: 10px !important;
71 | }
72 | /*recolor background*/
73 | .sticky-container {
74 | background: var(--in-content-box-background-op) !important;
75 | backdrop-filter: blur(11px) !important;
76 | }
77 | /*MAX WIDTH FIT TO PAGE*/
78 | search-addons > search-textbox {
79 | max-width: calc( 94vw - 32px) !important;
80 | }
81 | /*Search box fit */
82 | .main-search search-addons > search-textbox, search-addons,input {
83 | max-width: calc( 94vw - 32px ) !important;
84 | min-width: 0 !important;
85 | }
86 | /*Max width of the body elements*/
87 | #main, body, #full, .main-search {
88 | max-width: 99vw !important;
89 | min-width: 0px !important;
90 | }
91 | #main {
92 | margin-left: 14px !important;
93 | }
94 | #content {
95 | margin-left: -45px !important;
96 | }
97 |
98 |
99 | /*Highlight selected category*/
100 | button.category {
101 | filter: contrast(0.16) brightness(0.7) !important;
102 | }
103 | button.category[selected] {
104 | filter: contrast(1) !important;
105 | }
106 | :root {
107 | --in-content-category-background-selected: rgba(1, 1, 1, 0) !important;
108 | }
109 |
110 | /*Addon card styling and margin fit*/
111 | .addon-name {
112 | font-size: 13px !important;
113 | font-weight: 600 !important;
114 | line-height: 24px !important;
115 | margin-inline-end: auto !important;
116 | max-width: 50vw!important;
117 | }
118 | .card {
119 | -moz-padding-start: 10px !important;
120 | margin: 3px !important;
121 | /*only for light mode change bacrkound*/
122 | background: rgba(182, 166, 176, 0.3) !important;
123 | }
124 | /*Hide addon description */
125 | .addon-description {
126 | display: none !important;
127 | }
128 | .card-contents {
129 | padding-top: 10px !important;
130 | }
131 | addon-card:not([expanded="true"]) .card-heading-image {
132 | display: none !important;
133 | }
134 | .addon-name-link, .addon-name-link:hover {
135 | color: var(--in-content-text-color) !important;
136 | text-decoration: none !important;
137 | }
138 | /*Addon card margins*/
139 | addon-card:not([expanded="true"]) .addon.card {
140 | margin-top: 11px !important;
141 | margin-bottom: -2px !important;
142 | padding-top: 3px !important;
143 | padding-bottom: 2px !important;
144 | min-height: 40px !important;
145 | }
146 | .card-heading-icon {
147 | padding: 10px !important;
148 | padding-left: 0px !important;
149 |
150 | }
151 |
152 | /*Make the toggle button bigger */
153 |
154 | input[type="checkbox"].toggle-button{
155 | width: 37px!important;
156 | height: 19px!important;
157 | border:1px solid rgb(30,120,130)!important;
158 | }
159 | input[type="checkbox"].toggle-button:checked::before {
160 | transform: translate(18px, calc(50% - var(--dot-size) / 2))!important;
161 | }
162 | input[type="checkbox"].toggle-button::before {
163 | width: 13px!important;
164 | height: 13px!important;
165 | margin-top:0px!important;
166 | background-color: rgb(70,220,200)!important;
167 | }
168 | input[type="checkbox"].toggle-button:checked:hover {
169 | border-color: rgb( 50,50,50)!important;
170 | background-color: rgb(100,80,90)!important;
171 | }
172 |
173 | /*hide badge*/
174 | .addon-badge {
175 | display: none !important;
176 | }
177 | addon-list[type="theme"] .addon.card {
178 | min-height: 40px !important;
179 | min-width: 0px !important;
180 | }
181 |
182 | /*More options button shrink and recolour*/
183 | addon-card:not([expanded="true"]) .addon.card .more-options-button {
184 | margin-left: 9px !important;
185 | width: 17px !important;
186 | height: 17px !important;
187 | background-color: rgba(120, 120, 120, 0.1) !important;
188 | order: 1 !important;
189 | }
190 |
191 | addon-card:not([expanded="true"]) .card-heading-icon {
192 | margin-inline-end: 0px !important;
193 | }
194 | /* remove advertising other add-ons */
195 | recommended-themes-section, recommended-extensions-section {
196 | display: none !important;
197 | }
198 |
199 | /*Dark mode color adjustments*/
200 | @media (prefers-color-scheme: dark) {
201 | :root {
202 | --in-content-page-background: rgba(0, 1, 1, 0) !important;
203 | }
204 | #sidebar {
205 | background-color:rgba(52, 66, 76, 0.3)!important;
206 | }
207 | .card {
208 | background: rgba(52, 66, 76, 0.3) !important;
209 | }
210 | search-addons > search-textbox {
211 | background: var(--accent-color) !important;
212 | font-weight: 550 !important;
213 | color: white !important;
214 | }
215 | .theme-enable-button {
216 | background-color: rgb(20, 50, 20) !important;
217 | }
218 | .theme-enable-button[data-l10n-id="disable-addon-button"] {
219 | background-color: rgba(70, 20, 20) !important;
220 | }
221 | .addon-name-link, .addon-name-link:hover {
222 | color: var(--in-content-text-color) !important;
223 | text-decoration: none !important;
224 | text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000 !important;
225 | }
226 | }
227 | }
228 | }
--------------------------------------------------------------------------------
/chrome/userChrome-files/icons/arrowDown.svg:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/chrome/userChrome-files/icons/arrowUp.svg:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/chrome/userChrome-files/icons/cclose.svg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ATechnocratis/widefox/e4e459b19e0642e604ebe9a95291205089c1ba26/chrome/userChrome-files/icons/cclose.svg
--------------------------------------------------------------------------------
/chrome/userChrome-files/icons/identiy_icon_alt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ATechnocratis/widefox/e4e459b19e0642e604ebe9a95291205089c1ba26/chrome/userChrome-files/icons/identiy_icon_alt.png
--------------------------------------------------------------------------------
/chrome/userChrome-files/icons/quit.svg:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/chrome/userChrome-files/icons/restore-session.svg:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/chrome/userChrome-files/icons/sideclosed.svg:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chrome/userChrome-files/icons/sideopen.svg:
--------------------------------------------------------------------------------
1 |
4 |
6 |
10 |
11 |
--------------------------------------------------------------------------------
/chrome/userChrome-files/icons_and_buttons.css:
--------------------------------------------------------------------------------
1 |
2 | /* Hides some of the icons of the toolabar and most inside the urlbar */
3 | /*Delete any rule if you want the icon to be displayed */
4 |
5 | #identity-icon-labels {
6 | display: none!important;
7 | }
8 |
9 | #back-button {
10 | display: none!important;
11 | }
12 | #forward-button {
13 | display: none!important;
14 | }
15 | #tracking-protection-icon-container {
16 | margin-left: 5px!important;
17 | }
18 | /* Hide Extension Name in the identity area */
19 | #identity-icon-label {
20 | display: none!important;
21 | }
22 | #reader-mode-button {
23 | display: none!important;
24 | }
25 | #userContext-icons {
26 | display: none!important;
27 | }
28 | #identity-permission-box {
29 | display: none!important;
30 | }
31 |
32 | #page-action-buttons {
33 | display: none!important;
34 | }
35 |
36 |
37 | #pageActionSeparator {
38 | display: none!important;
39 | }
40 |
41 | /*Restyle identity icon*/
42 | #identity-icon {
43 | opacity: 1!important;
44 | fill: #db068d!important;
45 | }
46 |
47 | #identity-icon {
48 | list-style-image: none!important;
49 | mask: url(./icons/identiy_icon_alt.png) no-repeat!important;
50 | background-color: var(--toolbarbutton-icon-fill)!important;
51 | mask-size: 100% 100%!important;
52 | }
53 | #identity-icon-box {
54 | background: none!important;
55 | padding-inline: 0px!important;
56 | margin-left: 4px!important;
57 | }
58 | #identity-box {
59 | border-image-slice: 0!important;
60 | }
61 |
62 | /*Color changes */
63 | #tracking-protection-icon-container {
64 | width: unset!important;
65 | opacity: 0.8!important;
66 | fill: var(--toolbarbutton-icon-fill)!important;
67 | }
68 | #connection-icon {
69 | opacity: 0.2!important;
70 | fill: var(--toolbarbutton-icon-fill)!important;
71 | }
72 | #urlbar :hover>#ttracking-protection-icon-container {
73 | opacity: 0.8!important;
74 | transition: opacity 900ms !important;
75 | }
76 | #urlbar :hover>#connection-icon {
77 | opacity: 0.6!important;
78 | transition: opacity 900ms !important;
79 | }
80 | .autoplay-media-icon {
81 | opacity: 0.3!important;
82 | fill: var(--toolbarbutton-icon-fill)!important;
83 | }
84 | .desktop-notification-icon {
85 | opacity: 0.3!important;
86 | fill: var(--toolbarbutton-icon-fill)!important;
87 | }
88 | #extension-icon {
89 | opacity: 0.2!important;
90 | fill: var(--toolbarbutton-icon-fill)!important;
91 | }
92 | #page-action-buttons {
93 | opacity: 0.2!important;
94 | fill: #db068d!important;
95 | }
96 |
97 | /*Vertical bookmark toolbar Buttons recolor */
98 | #PersonalToolbar toolbarbutton{
99 | filter:opacity(0.7) grayscale(0.2)!important;
100 | transition: filter 600ms!important;
101 | }
102 |
103 | #PersonalToolbar toolbarbutton:hover{
104 | filter:opacity(1)!important;
105 | }
106 |
--------------------------------------------------------------------------------
/chrome/userChrome-files/main_menu_icons_restore.css:
--------------------------------------------------------------------------------
1 | /*CREDITS to MrOtherGuy*/
2 | /*UNDER LICENSE OF ORIGINAL SOURCE*/
3 |
4 | /* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/iconized_main_menu.css made available under Mozilla Public License v. 2.0
5 | See the above repository for updates as well as full license text. */
6 |
7 |
8 | /* Adds icons to main menu items which were removed in Proton */
9 | #appMenu-fxa-status2[fxastatus] > toolbarbutton::before,
10 | #appMenu-protonMainView > .panel-subview-body > toolbarbutton > image{
11 | fill: currentColor!important;
12 | -moz-context-properties: fill!important;
13 | margin-inline: 0 8px !important;
14 | }
15 | #appMenu-new-tab-button2{ list-style-image: url("chrome://browser/skin/new-tab.svg") }
16 | #appMenu-new-window-button2{ list-style-image: url("chrome://browser/skin/window.svg") }
17 | #appMenu-new-private-window-button2{ list-style-image: url("chrome://browser/skin/privateBrowsing.svg") }
18 | #appMenu-bookmarks-button{ list-style-image: url("chrome://browser/skin/bookmark-star-on-tray.svg") }
19 | #appMenu-history-button{ list-style-image: url("chrome://browser/skin/history.svg") }
20 | #appMenu-downloads-button{ list-style-image: url("chrome://browser/skin/downloads/downloads.svg") }
21 | #appMenu-passwords-button{ list-style-image: url("chrome://global/skin/icons/security.svg") }
22 | #appMenu-extensions-themes-button{ list-style-image: url("chrome://mozapps/skin/extensions/extension.svg") }
23 | #appMenu-print-button2{ list-style-image: url("chrome://global/skin/icons/print.svg") }
24 | #appMenu-save-file-button2{ list-style-image: url("chrome://browser/skin/save.svg") }
25 | #appMenu-find-button2{ list-style-image: url("chrome://global/skin/icons/search-glass.svg") }
26 | #appMenu-settings-button{ list-style-image: url("chrome://global/skin/icons/settings.svg") }
27 | #appMenu-more-button2{ list-style-image: url("chrome://global/skin/icons/developer.svg") }
28 | #appMenu-help-button2{ list-style-image: url(chrome://global/skin/icons/info.svg) }
29 | #appMenu-quit-button2{ list-style-image: url(./icons/quit.svg) }
30 | #appMenu-RestoreLastSession-button {list-style-image: url(./icons/restore-session.svg)!important; }
31 |
32 |
33 |
34 |
35 | /* Use account-button icon for signed in sync item */
36 | #appMenu-fxa-status2[fxastatus] > toolbarbutton::before{
37 | display: -moz-box!important;
38 | content: ""!important;
39 | width: 16px!important;
40 | height: 16px!important;
41 | background-image: var(--avatar-image-url)
42 | }
43 | /* Add somewhat hacky separator to zoom controls so it looks consistent */
44 | #appMenu-protonMainView > .panel-subview-body::after{
45 | content: ""!important;
46 | display: -moz-box!important;
47 | border-bottom: 1px solid var(--panel-separator-color)!important;
48 | margin: var(--panel-separator-margin)!important;
49 | }
50 |
51 | #appMenu-find-button2 ~ *{
52 | -moz-box-ordinal-group: 2!important;
53 | }
--------------------------------------------------------------------------------
/chrome/userChrome-files/maximized_mode_tweaks.css:
--------------------------------------------------------------------------------
1 |
2 | /*Hide Tabs */
3 | #main-window[sizemode="maximized"] .toolbar-items {
4 | display: none!important;
5 | }
6 |
7 | /*No bar style margin fixes*/
8 |
9 | /* Titlebar margin fix */
10 | #main-window[sizemode="maximized"] #titlebar {
11 | margin-top: calc( (-1) * var(--titlebar-hide))!important;
12 | }
13 |
14 | /*Sidebar margin fix*/
15 | #main-window[sizemode="maximized"] #sidebar-box {
16 | margin-top: var(--top-toolbar-height)!important;
17 | }
18 |
19 | /*Web view move to topmost */
20 | #main-window[sizemode="maximized"]:not([inFullscreen]) #appcontent {
21 | margin-top: var(--top-toolbar-height)!important;
22 | z-index: 10000!important;
23 | position: relative!important;
24 | }
25 |
26 | /*Notification move to top centre*/
27 | #main-window[sizemode="maximized"] #tab-notification-deck, #navigator-toolbox>div:nth-child(6) {
28 | z-index: 999999!important;
29 | position: absolute!important;
30 | bottom: 0!important;
31 | left: 40%!important;
32 | top: 5px!important;
33 | }
34 | /*Menu bar move under urlbar */
35 | #main-window[sizemode="maximized"] #toolbar-menubar:not([inactive]) {
36 | margin-top: var(--titlebar-hide)!important;
37 | z-index: 2!important;
38 | }
39 | #main-window[sizemode="maximized"] #toolbar-menubar {
40 | position: fixed!important;
41 | display: flex!important;
42 | top: 13px!important;
43 | max-height: 10px!important;
44 | z-index: 10!important;
45 | }
46 |
47 | /*Menu bar styling*/
48 | #main-window[sizemode="maximized"] #main-menubar {
49 | background-color: var(--arrowpanel-background)!important;
50 | color: var(--arrowpanel-color)!important;
51 | }
52 |
53 | /*Hide sidebar header close button*/
54 | #main-window[sizemode="maximized"] #sidebar-close {
55 | transform: scale(1)!important;
56 | margin-right: 1px!important;
57 | opacity: 0!important;
58 | width: 87px!important;
59 | pointer-events: none!important;
60 | }
61 | /*Titlebar buttons (min-max-close)*/
62 |
63 | /*Hide second titlebar buttons from menumbar*/
64 | #toolbar-menubar .titlebar-buttonbox-container {
65 | display: none!important;
66 | }
67 | /*Move to upper left */
68 | #main-window[sizemode="maximized"] #TabsToolbar .titlebar-buttonbox-container {
69 | margin-left: calc( 100vw - 115px)!important;
70 | display: block!important;
71 | margin-top: calc( 33px - 20px + var(--titlebar-hide) )!important;
72 | position: absolute!important;
73 | z-index: 3!important;
74 | }
75 | /*Animation on hover of close button (Optional)*/
76 | @keyframes closeBanim {
77 | 0% {
78 | transform: rotate(0deg);
79 | }
80 | 75% {
81 | transform: rotate(0deg);
82 | }
83 | 100% {
84 | transform: rotate(360deg);
85 | }
86 | }
87 | /*Styling Min max close buttons*/
88 | #main-window[sizemode="maximized"] .titlebar-min {
89 | mask: url(./icons/arrowDown.svg) no-repeat!important;
90 | }
91 | #main-window[sizemode="maximized"] .titlebar-restore, #main-window[sizemode="maximized"] .titlebar-max {
92 | mask: url(./icons/arrowUp.svg) no-repeat!important;
93 | }
94 | #main-window[sizemode="maximized"] .titlebar-close:hover {
95 | animation: closeBanim 7s reverse infinite!important;
96 | animation-timing-function: linear!important;
97 | }
98 | #main-window[sizemode="maximized"] .titlebar-close {
99 | margin-left: 18px!important;
100 | list-style-image: none!important;
101 | background-color: var(--toolbarbutton-icon-fill)!important;
102 | filter: grayscale(0.3)!important;
103 | mask: url(./icons/cclose.svg) no-repeat!important;
104 | margin-block: 0!important;
105 | mask-size: 100% 100%!important;
106 | padding: 0!important;
107 | max-height: 18px!important;
108 | min-width: 18px!important;
109 | height: 18px!important;
110 | width: 18px!important;
111 | }
112 | #main-window[sizemode="maximized"] .titlebar-button{
113 | padding-left: 0px!important;
114 | padding-right: 0px!important;
115 |
116 | }
117 | #main-window[sizemode="maximized"] .titlebar-restore, #main-window[sizemode="maximized"] .titlebar-max, #main-window[sizemode="maximized"] .titlebar-min {
118 | margin-left: 20px!important;
119 | list-style-image: none!important;
120 | background-color: var(--toolbarbutton-icon-fill)!important;
121 | filter: grayscale(0.3)!important;
122 | mask-size: 100% 100%!important;
123 | height: 18px!important;
124 | }
125 | #main-window[sizemode="maximized"] .titlebar-close>image:nth-child(1) {
126 | display: none!important;
127 | }
--------------------------------------------------------------------------------
/chrome/userChrome-files/normal_mode.css:
--------------------------------------------------------------------------------
1 | :root {
2 | /*tree style tab sidebar width*/
3 | --thin-tab-width: 60px!important;
4 | /*hovered width*/
5 | --wide-tab-width: 300px!important;
6 | }
7 | /* hide title bar and its elements */
8 |
9 | :root[sizemode="normal"] #titlebar-secondary-buttonbox, :root[sizemode="normal"] #titlebar .titlebar-spacer, :root[sizemode="normal"] #toolbar-menubar, :root[sizemode="normal"] #tabbrowser-tabs, :root[sizemode="normal"] #TabsToolbar .toolbar-items {
10 | display: none!important;
11 | }
12 | :root[tabsintitlebar][sizemode="normal"] #titlebar {
13 | appearance: none!important;
14 | }
15 | :root[sizemode="normal"] #nav-bar {
16 | z-index: 1!important;
17 | }
18 | :root[sizemode="normal"] #navigator-toolbox #toolbar-menubar {
19 | -moz-box-ordinal-group: 1 !important;
20 | }
21 | :root[sizemode="normal"] #titlebar {
22 | -moz-box-ordinal-group: 2 !important;
23 | }
24 | :root[sizemode="normal"] .titlebar-buttonbox-container {
25 | z-index: 2!important;
26 | position: absolute!important;
27 | }
28 | :root[sizemode="normal"] toolbarspring {
29 | display: none!important;
30 | }
31 | :root[sizemode="normal"] #urlbar:not([focused="true"]) #urlbar-input {
32 | text-align: center!important;
33 | }
34 | :root[sizemode="normal"] #titlebar {
35 | max-height: 0px!important;
36 | }
37 | /* hide sidebar header */
38 |
39 | :root[sizemode="normal"] #sidebar-header {
40 | display: none!important;
41 | }
42 | /* align nav bar buttons vertically with window control buttons */
43 |
44 | :root[sizemode="normal"] #PanelUI-menu-button, :root[sizemode="normal"] #stop-reload-button, :root[sizemode="normal"] #nav-bar-customization-target>.toolbarbutton-1 {
45 | margin-top: 3px !important;
46 | }
47 | /* color menu button to mark private browsing windows */
48 |
49 | :root[sizemode="normal"] #main-window[privatebrowsingmode="temporary"] #PanelUI-menu-button>.toolbarbutton-badge-stack {
50 | background-color: #25003E!important;
51 | }
52 | :root[sizemode="normal"] {
53 | --uc-vertical-toolbar-width: 35px!important;
54 | }
55 | /* Move Hamburger to left */
56 |
57 | #PanelUI-button, #customization-panel-container, #customization-panelWrapper .panel-arrow {
58 | -moz-box-ordinal-group: 0 !important;
59 | margin-right: -6px !important;
60 | }
61 | #main-window[sizemode="normal"] #appMenu-popup {
62 | margin-right: -260px!important;
63 | }
64 | /*Vertical auto hidden personal toolbar show on hover*/
65 |
66 | :root[sizemode="normal"] #PersonalToolbar {
67 | display: flex!important;
68 | flex-direction: column!important;
69 | position: absolute!important;
70 | height: 100vh!important;
71 | max-height: 100vh !important;
72 | padding: 0px!important;
73 | padding-bottom: 120px !important;
74 | z-index: 1111!important;
75 | pointer-events: auto !important;
76 | transition: all 0ms ease!important;
77 | overflow: scroll!important;
78 | scrollbar-width: none!important;
79 | width: 35px!important;
80 | margin-top:calc( -1 * var(--top-toolbar-height) - 1px )!important;
81 |
82 | }
83 | :root:not([customizing])[sizemode="normal"] #PersonalToolbar:not(:hover) {
84 | width: 4px!important;
85 | min-width: 4px!important;
86 | opacity: 0!important;
87 | }
88 | :root[customizing][sizemode="normal"] #customization-container {
89 | margin-left: 100px!important;
90 | }
91 | :root[sizemode="normal"] #PersonalToolbar:hover {
92 | padding: 3px!important;
93 | width: var(--uc-vertical-toolbar-width)!important;
94 | opacity: 1!important;
95 | transition: opacity 800ms ease!important;
96 | }
97 | :root[customizing] #PersonalToolbar {
98 | padding: 3px!important;
99 | width: var(--uc-vertical-toolbar-width)!important;
100 | opacity: 1!important;
101 | transition: opacity 800ms ease!important;
102 | }
103 | #main-window[sizemode="normal"] #personal-toolbar-empty {
104 | display: none!important;
105 | }
106 | :root[sizemode="normal"] #personal-bookmarks {
107 | overflow-y: auto!important;
108 | scrollbar-width: none!important;
109 | }
110 | /* :root[sizemode="normal"] #PersonalToolbar>#personal-bookmarks>#PlacesToolbar>hbox {
111 | -moz-box-orient: vertical !important;
112 | } */
113 | :root[sizemode="normal"] #PersonalToolbar #PlacesToolbarItems {
114 | display: flex!important;
115 | flex-direction: column!important;
116 | }
117 | :root[sizemode="normal"] #PersonalToolbar .toolbarbutton-1 {
118 | padding-block: 8px !important;
119 | margin:0px!important;
120 | margin-right: 0px!important;
121 |
122 |
123 | }
124 | :root[sizemode="normal"] #PersonalToolbar #PlacesToolbarItems>.bookmark-item {
125 | padding-block: 4px !important;
126 | }
127 | :root[sizemode="normal"] #zoom-controls {
128 | opacity: 0.9;
129 | transform: rotate(90deg)!important;
130 | margin-bottom: 110px;
131 | margin-top: -10px;
132 | }
133 | :root[customizing][sizemode="normal"] #zoom-controls {
134 | margin-top: 50px;
135 | margin-left: -45px!important;
136 | margin-bottom: 50px!important;
137 | }
138 | :root[sizemode="normal"] #zoom-controls[cui-areatype="toolbar"]>#zoom-reset-button>.toolbarbutton-text {
139 | transform: rotate(180deg)!important;
140 | font-size: 15px!important;
141 | font-family: serif!important;
142 | }
143 | /* Sidebar min and max width removal */
144 |
145 | :root[sizemode="normal"] #sidebar {
146 | max-width: none !important;
147 | min-width: 0px !important;
148 | }
149 | /* Hide splitter, when using Tree Style Tab. */
150 |
151 | :root[sizemode="normal"] #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]+#sidebar-splitter {
152 | display: none !important;
153 | }
154 | /* Hide sidebar header, when using Tree Style Tab. */
155 |
156 | :root[sizemode="normal"] #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
157 | visibility: collapse!important;
158 | display: none!important;
159 | }
160 | :root[sizemode="normal"] #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar {
161 | margin-top: calc( (-1) *( var(--sideheader-margin) + var(--tst-roots-gap))) !important;
162 | }
163 | /* Shrink sidebar until hovered, when using Tree Style Tab. */
164 |
165 | :root[sizemode="normal"] #sidebar-box:not([sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]) {
166 | min-width: var(--wide-tab-width) !important;
167 | max-width: none !important;
168 | }
169 | :root[sizemode="normal"] #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] {
170 | position: relative !important;
171 | /*transition: all 100ms !important;*/
172 | min-width: var(--thin-tab-width) !important;
173 | max-width: var(--thin-tab-width) !important;
174 | z-index: 1!important;
175 | transition: all 200ms !important;
176 | z-index: 0!important;
177 | }
178 | :root[sizemode="normal"] #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]:hover {
179 | transition: all 200ms !important;
180 | margin-right: calc((var(--wide-tab-width) - var(--thin-tab-width)) * -1) !important;
181 | min-width: var(--wide-tab-width) !important;
182 | z-index: 0!important;
183 | position: absolute
184 | }
185 | /* Titlebar min-max-close buttons replace*/
186 | :root[sizemode="normal"] #nav-bar {
187 | padding-right: 120px;
188 | }
189 | :root[sizemode="normal"] #TabsToolbar .titlebar-buttonbox-container {
190 | display: block !important;
191 | position: absolute !important;
192 | top: 2px!important;
193 | right: 0!important;
194 | }
195 | .titlebar-min {
196 | mask: url(./icons/arrowDown.svg) no-repeat!important;
197 | }
198 | .titlebar-restore, .titlebar-max {
199 | mask: url(./icons/arrowUp.svg) no-repeat!important;
200 | }
201 | :root[sizemode="normal"] .titlebar-close {
202 | margin-left: 18px!important;
203 | margin-right: 8px!important;
204 | list-style-image: none!important;
205 | background-color: var(--toolbarbutton-icon-fill)!important;
206 | filter: grayscale(0.3)!important;
207 | mask: url(./icons/cclose.svg) no-repeat!important;
208 | margin-block: 5px!important;
209 | mask-size: 100% 100%!important;
210 | padding: 0!important;
211 | max-height: 18px!important;
212 | min-width: 18px!important;
213 | }
214 | :root[sizemode="normal"] .titlebar-restore,:root[sizemode="normal"] .titlebar-max,:root[sizemode="normal"] .titlebar-min {
215 | margin-left: 20px!important;
216 | list-style-image: none!important;
217 | background-color: var(--toolbarbutton-icon-fill)!important;
218 | filter: grayscale(0.3)!important;
219 | mask-size: 100% 100%!important;
220 | min-width: 14px!important;
221 | min-height: 14px!important;
222 | max-width: 14px!important;
223 | }
224 | :root[sizemode="normal"]
225 | .titlebar-button{
226 | padding-left: 0px!important;
227 | padding-right: 0px!important;
228 | }
229 |
--------------------------------------------------------------------------------
/chrome/userChrome-files/shadow-root.as.css:
--------------------------------------------------------------------------------
1 |
2 | .textbox-search-clear {
3 | filter:invert(1)!important;
4 | }
5 |
6 | @-moz-document url-prefix(chrome://mozapps/content/extensions/extensions.xul),
7 | url-prefix(about:addons), url-prefix(chrome://mozapps/content/extensions/aboutaddons.html),
8 | url-prefix(chrome://mozapps/content/extensions/aboutaddons.xhtml) {
9 |
10 | @media (max-width: 630px) {
11 | .main-search search-addons > search-textbox, search-addons,input {
12 | max-width: calc( 94vw - 32px )!important;
13 | min-width: 0!important;
14 | }
15 | }
--------------------------------------------------------------------------------
/chrome/userChrome-files/sidebar_floating.css:
--------------------------------------------------------------------------------
1 | @-moz-document url-prefix("chrome://browser/content/places/bookmarksSidebar.xhtml"), url-prefix("chrome://browser/content/downloads/contentAreaDownloadsView.xhtml"), url-prefix("chrome://browser/content/places/historySidebar.xhtml") {
2 |
3 | :root {
4 | --sidebar-left-margin: 14px!important;
5 | --sidebar-right-margin: 14px!important;
6 | --sidepanel-box-shadow: 2px 2px 7px 1px black!important;
7 | --sidepanel_border-radius: 16px!important;
8 |
9 | }
10 |
11 | @media (prefers-color-scheme: dark) {
12 | :root {
13 | --sidepanel-background: rgba(60, 60, 60, 0.0)!important;
14 | --float-box-background: rgba(100, 100, 100, 0.05)!important;
15 | --in-content-box-border-color: rgba(75, 45, 45, 0.3)!important;
16 | --box-background: rgba(25, 25, 25, 0.3)!important;
17 | --search-box-background: rgba(53, 43, 53, 0.05)!important;
18 | --box-selected-background: rgba(55, 55, 55, 0.5)!important;
19 |
20 | }
21 | }
22 | }
23 | /* remove maximum/minimum width restriction of sidebar */
24 |
25 | #sidebar {
26 | max-width: none !important;
27 | min-width: 0px !important;
28 | }
29 |
30 | #sidebar-splitter{
31 | opacity:0.2
32 | }
33 | .sidebar-placesTree {
34 | -moz-appearance: none!important;
35 | color: var(--panel-description-color,--lwt-sidebar-text-color)!important;
36 | font-size: 13px!important;
37 | /* font-family: arial!important;*/
38 | font-family: liberation mono!important;
39 |
40 | }
41 |
42 |
43 | /*Bookmarks sidebar*/
44 |
45 | /* move bookmarks to the left border */
46 |
47 | .sidebar-placesTreechildren[view="bookmarks-view"] {
48 | margin-left: -8px !important;
49 |
50 | }
51 | /* gap between single bookmarks */
52 | .sidebar-placesTree treechildren::-moz-tree-row {
53 | min-height: 21px !important;
54 | height: 21px !important;
55 |
56 | }
57 |
58 | #bookmarks-view-children:-moz-tree-image {
59 | margin-left: 0px !important;
60 | }
61 |
62 | /* left-hand space at opened subfolders */
63 |
64 | .sidebar-placesTreechildren::-moz-tree-indentation {
65 | width: 7px !important;
66 | }
67 |
68 | /*Make side panels floating*/
69 |
70 | @-moz-document url-prefix("chrome://browser/content/places/bookmarksSidebar.xhtml") {
71 | #search-box {
72 | background: none!important;
73 | appearance: unset!important;
74 | color: var(--panel-description-color,--lwt-sidebar-text-color)!important;
75 |
76 | }
77 | #bookmarksPanel {
78 | padding: 18px!important;
79 | margin-right: calc( -14px + var(--sidebar-right-margin))!important;
80 | padding-left: var( --sidebar-left-margin)!important;
81 | background-image: var(--sidebar-background-image)!important;
82 | background-size: cover!important;
83 | }
84 | #sidebar-search-container {
85 | border-radius: 0!important;
86 | border: 1px solid var(--in-content-box-border-color)!important;
87 | border-top-left-radius: var(--sidepanel_border-radius)!important;
88 | border-top-right-radius: var(--sidepanel_border-radius)!important;
89 | z-index: 3!important;
90 | position: absolute!important;
91 | backdrop-filter: blur(3px)!important;
92 | }
93 | #bookmarks-view {
94 | margin-top: var(--sidebar-padding)!important;
95 | margin-bottom: 3px!important;
96 | border: 1px solid var(--in-content-box-border-color)!important;
97 | border-radius: var(--sidepanel_border-radius)!important;
98 | padding-left: 4px!important;
99 | padding-top: 50px!important;
100 | padding-bottom: 10px!important;
101 | scrollbar-color: rgba(37, 0, 0, .1) rgba(0, 0, 0, 0)!important;
102 | box-shadow: 1px 1px 3px 0px grey!important;
103 | backdrop-filter: blur(3px)!important;
104 | background: var(--toolbar-bgimage)!important;
105 | }
106 | /*Dark mode recolor*/
107 | @media (prefers-color-scheme: dark) {
108 | #search-box {
109 | background-color: rgba(1, 1, 1, 0) !important;
110 | background: none!important;
111 |
112 | }
113 | #bookmarksPanel {
114 | background: none!important;
115 | background-color: var(--sidepanel-background)!important;
116 | }
117 | #sidebar-search-container {
118 | background: var(--search-box-background)!important;
119 | border: 1px solid var(--in-content-box-border-color)!important;
120 | }
121 | #bookmarks-view {
122 | background: var(--float-box-background)!important;
123 | border: 1px solid var(--in-content-box-border-color)!important;
124 | box-shadow: var(--sidepanel-box-shadow)!important;
125 |
126 | }
127 |
128 | treechildren::-moz-tree-row(selected, current, focus) {
129 | border: 1px dotted rgb(100,10,10)!important;
130 | outline:none !important;
131 | background:none!important;
132 | }
133 |
134 | treechildren::-moz-tree-separator {
135 | border-top: 1px solid rgb(60,60,60)!important;
136 | border-bottom: 1px solid rgb(120,120,120)!important;
137 | }
138 | }
139 | }
140 | /*History sidebar*/
141 | @-moz-document url-prefix("chrome://browser/content/places/historySidebar.xhtml") {
142 | #search-box {
143 | appearance: unset!important;
144 | }
145 | #sidebar-search-container {
146 | border-radius: 0!important;
147 | border: 1px solid var(--in-content-box-border-color)!important;
148 | border-top-left-radius: var(--sidepanel_border-radius)!important;
149 | border-top-right-radius: var(--sidepanel_border-radius)!important;
150 | opacity: 0.8!important;
151 | z-index: 3!important;
152 | position: absolute!important;
153 | backdrop-filter: blur(1px)!important;
154 | }
155 | #historyTree {
156 | margin-top: var(--sidebar-padding)!important;
157 | margin-bottom: 3px!important;
158 | border: 1px solid var(--in-content-box-border-color)!important;
159 | border-radius: var(--sidepanel_border-radius)!important;
160 | padding-left: 4px!important;
161 | padding-top: 43px!important;
162 | padding-bottom: 10px!important;
163 | scrollbar-color: rgba(77, 77, 77, .1) rgba(0, 0, 0, 0)!important;
164 | box-shadow: 2px 2px 7px 1px grey!important;
165 | backdrop-filter: blur(4px)!important;
166 | }
167 | #history-panel {
168 | padding: 18px!important;
169 | padding-left: var( --sidebar-left-margin)!important;
170 | margin-right: calc( -14px + var(--sidebar-right-margin))!important;
171 | background-image: var(--sidebar-background-image)!important!important;
172 | background-size: cover!important;
173 | }
174 | treechildren {
175 | margin-left: -10px!important;
176 | margin-top: 10px!important;
177 | }
178 | @media (prefers-color-scheme: light) {
179 | #search-box {
180 | filter: invert(1)!important;
181 | }
182 | }
183 | /*Dark mode recolor*/
184 | @media (prefers-color-scheme: dark) {
185 | #search-box {
186 | background: none!important;
187 | }
188 | #sidebar-search-container {
189 | background: var(--search-box-background)!important;
190 | border: 1px solid var(--in-content-box-border-color)!important;
191 | }
192 | #historyTree {
193 | background: var(--float-box-background)!important;
194 | border: 1px solid var(--in-content-box-border-color)!important;
195 | scrollbar-color: rgba(77, 77, 77, .1) rgba(0, 0, 0, 0)!important;
196 | box-shadow: var(--sidepanel-box-shadow)!important;
197 | }
198 | #history-panel {
199 | background: none!important;
200 | background-color: var(--sidepanel-background)!important;
201 | }
202 | }
203 | #viewButton {
204 | border: none !important;
205 | background: transparent!important;
206 | }
207 | }
208 |
209 | /*Downloads sidebar*/
210 |
211 | @-moz-document url-prefix("chrome://browser/content/downloads/contentAreaDownloadsView.xhtml") {
212 |
213 | #contentAreaDownloadsView {
214 | padding: 18px!important;
215 | padding-left: calc( var( --sidebar-left-margin) )!important;
216 | margin-right: calc( -14px + var(--sidebar-right-margin))!important;
217 | }
218 | #downloadsListBox {
219 | margin-bottom: 3px!important;
220 | appearance: none!important;
221 | border-radius: var(--sidepanel_border-radius)!important;
222 | backdrop-filter: blur(4px)!important;
223 | border: 1px solid var(--in-content-box-border-color)!important;
224 |
225 | }
226 |
227 | richlistitem {
228 | order: none!important;
229 | }
230 | richlistitem[current="true"] {
231 | outline: none!important;
232 | }
233 | /*Dark mode recolour*/
234 | @media (prefers-color-scheme: dark) {
235 | #contentAreaDownloadsView {
236 | background: none!important;
237 | background-color: var(--sidepanel-background)!important;
238 | background-image: var(--sidebar-background-image)!important;
239 | background-size: cover!important;
240 |
241 | }
242 | #downloadsListBox {
243 | background: var(--float-box-background)!important;
244 | box-shadow: var(--sidepanel-box-shadow)!important;
245 | }
246 | richlistitem {
247 | background-color: var(--box-background)!important;
248 | color: grey!important;
249 | }
250 | richlistitem[current="true"] {
251 | background-color: var(--box-selected-background)!important;
252 | color: white!important;
253 | outline: none!important;
254 | }
255 | .downloadButton:not([disabled="true"]):hover,
256 | .downloadButton:not([disabled="true"]):hover:active,
257 | .downloadButton:not([disabled]):hover:active {
258 | color: inherit!important;
259 | }
260 | }
261 | }
262 |
--------------------------------------------------------------------------------
/chrome/userChrome-files/sidebar_header_tweaks.css:
--------------------------------------------------------------------------------
1 | /*Restyle header like a TST tab*/
2 | #main-window[sizemode="maximized"] #sidebar-header {
3 | background: var(--lwt-selected-tab-background-color) !important;
4 | backdrop-filter: blur(4px) brightness(0)!important;
5 | border: 14px rgba(1, 1, 1, 0) solid!important;
6 | position: relative!important;
7 | margin: 5px!important;
8 | margin-bottom: var(--tst-roots-gap)!important;
9 | border-radius: var(--tst-border-rad)!important;
10 | z-index: 1!important;
11 | padding: 0px!important;
12 | max-height: var(--tst-height)!important;
13 | min-height: var(--tst-height)!important;
14 | margin-left: 6px!important;
15 | margin-right: 5px!important;
16 | align-content: baseline;
17 | }
18 |
19 | #main-window[sizemode="maximized"] #sidebar-switcher-target {
20 | z-index: 21!important;
21 | }
22 | #sidebar-switcher-target {
23 | margin-left: 4px!important;
24 | }
25 | #main-window[sizemode="maximized"] #sidebar-switcher-arrow {
26 | margin-left: 1px!important;
27 | display: none!important;
28 | }
29 | #main-window[sizemode="maximized"] #sidebar-title {
30 | font-size: var(--tst-font-size)!important;
31 | }
32 | /*MAGRIN HACK for TST to be used together with treestyletab.css*/
33 |
34 | #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar {
35 | margin-top: calc( (-1) *( var(--tst-height) + 8px))!important;
36 | }
37 | #sidebar-splitter {
38 | margin-top: var(--top-toolbar-height)!important;
39 | }
40 | /*TST header name change*/
41 |
42 | #main-window[sizemode="maximized"] #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-title {
43 | display: none!important;
44 | /*Remove this line if you want full title*/
45 | font-size: var(--tst-font-size)!important;
46 | margin-left: -2px!important;
47 | }
48 | /*Remove if you want full title*/
49 |
50 | #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-switcher-target::after {
51 | margin-left: 8px!important;
52 | appearance: dialog!important;
53 | content: "Tabs"!important;
54 | display: block!important;
55 | font-size: var(--tst-font-size)!important;
56 | color: var(--lwt-tab-text)!important;
57 | }
--------------------------------------------------------------------------------
/chrome/userChrome-files/sidebar_modoki_style.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --sm-tab-width: 70px;
3 | }
4 |
5 | #SM_toolbox {
6 | opacity: 1!important;
7 | background-color: var(--toolbar-bgcolor, --toolbar-non-lwt-bgcolor);
8 | margin-right: -6px!important;
9 | z-index: 1!important;
10 | margin-top: -1px!important;
11 | }
12 | /*Splitter -resizer style*/
13 | #SM_splitter {
14 | background-color: rgba(0, 0, 0, 0) !important;
15 | margin-top: 0px;
16 | z-index: 9999;
17 | position: absolute!important;
18 | margin-top: -40px!important;
19 | border-color: transparent!important;
20 | }
21 | #SM_tabs {
22 | border-color: var(--arrowpanel-border-color);
23 | border-bottom-style: solid;
24 | border-width: 1px;
25 | }
26 |
27 | /*GRAB theme background image*/
28 | #SM_tabpanels {
29 | background: var(--toolbar-bgimage);
30 | background: var(--browser-bg-url);
31 | background: var(--lwt-header-image);
32 | background: var(--lwt-additional-images);
33 | background-color: var(--lwt-sidebar-background-color);
34 | background-color: var(--lwt-accent-color)!important;
35 | appearance: unset;
36 | background-size: cover;
37 | }
38 | #SM_Button:-moz-lwtheme-brighttext {
39 | background: transparent!important;
40 | }
41 | /*Firefox forced light colors fix*/
42 | tabpanels {
43 | color-scheme: unset!important;
44 | }
45 | tab {
46 | color-scheme: unset!important;
47 | }
48 |
49 | /*ADD ICONS instead of text on tabs*/
50 | .SM_tab {
51 | -moz-context-properties: fill!important;
52 | font-size: 0px!important;
53 | width: 42px!important;
54 | filter: saturate(0.6)!important;
55 | opacity: 0.7!important;
56 | margin-top: -12px!important;
57 | padding-bottom: 6px!important;
58 | padding-top: 6px!important;
59 | }
60 | .SM_tab[selected="true"] {
61 | opacity: 1!important;
62 | filter: saturate(1)!important;
63 | padding: 1px 4px 2px!important;
64 |
65 | }
66 | #SM_tab0 {
67 | list-style-image: url("chrome://browser/skin/bookmark-star-on-tray.svg")!important;
68 | fill: red!important;
69 | }
70 | .SM_tab>hbox>image {
71 | margin-left: 6px!important;
72 | min-width: 18px!important;
73 | }
74 | #nav_button_container {
75 | width: 40px!important;
76 | }
77 | #SM_tab0 {
78 | list-style-image: url("chrome://browser/skin/bookmark-star-on-tray.svg")!important;
79 | fill: rgb(180, 180, 50)!important;
80 | }
81 | #SM_tab1 {
82 | list-style-image: url("chrome://browser/skin/downloads/downloads.svg")!important;
83 | fill: rgb(255, 170, 170)!important;
84 | opacity: 0!important;
85 | }
86 | #SM_tab1[selected="true"] {
87 | opacity: 0!important;
88 | }
89 | #SM_tabs #downloads-button {
90 | fill: rgb(170, 40, 40)!important;
91 | pointer-events: none!important;
92 | transform: scale(1.1)!important;
93 | }
94 | #SM_tabbox[selectedIndex="1"] #SM_tabs #downloads-button {
95 | opacity: 1!important;
96 | fill: rgb(220, 60, 60)!important;
97 | }
98 | #SM_tab2 {
99 | list-style-image: url("chrome://browser/skin/history.svg");
100 | fill: rgb(120, 150, 160)!important;
101 | }
102 | #SM_tab3 {
103 | list-style-image: url("chrome://mozapps/skin/extensions/extension.svg");
104 | fill: rgb(180, 50, 230)!important;
105 | }
106 | #SV_tab0 {
107 | list-style-image: url("chrome://browser/skin/window.svg");
108 | fill: rgb(100, 100, 200)!important;
109 | }
110 | #SM_tab4 {
111 | list-style-image: url("chrome://global/skin/icons/settings.svg");
112 | fill: rgb(190, 90, 40)!important;
113 | }
114 | #SM_tab5 {
115 | list-style-image: url("chrome://global/skin/icons/info.svg");
116 | fill: rgb(30, 160, 200)!important;
117 | }
118 | #SM_tabs #downloads-button {
119 | --download-progress-pcent: 0%;
120 | margin-left: -201px!important;
121 | margin-top: -10px!important;
122 | }
--------------------------------------------------------------------------------
/chrome/userChrome-files/statuspanel.css:
--------------------------------------------------------------------------------
1 |
2 | #statuspanel #statuspanel-label {
3 | color: var(--toolbar-color)!important;
4 | border-color: rgba(115,115,115,0.5)!important;
5 | border-top-right-radius: 10px!important;
6 | }
7 |
8 | :root:not([lwtheme-image]) #statuspanel #statuspanel-label{
9 | background-color: var(--lwt-accent-color) !important;
10 | }
11 |
--------------------------------------------------------------------------------
/chrome/userChrome-files/urlbar.css:
--------------------------------------------------------------------------------
1 | /*Urlbar width and text fixes for maximized noline mode*/
2 |
3 | #main-window[sizemode="maximized"] #urlbar-container {
4 | min-width: 0!important;
5 | margin-left:0px!important;
6 | margin-right:0px!important;
7 | }
8 |
9 |
10 | /*Text align focused-unfocused*/
11 | :root[sizemode="maximized"] #urlbar:not([focused="true"]) #urlbar-input {
12 | text-align: center!important;
13 | }
14 | #main-window[sizemode="maximized"] #urlbar[open] #urlbar-input {
15 | text-align: left!important;
16 | }
17 |
18 | #urlbar-input {
19 | font-size: var(--urlbar_font_size)!important;
20 | text-overflow: ellipsis!important;
21 |
22 | }
23 |
24 | #main-window[sizemode="maximized"] #urlbar[focused] {
25 | min-width: var( --urlbar-foucs-width)!important;
26 | position: absolute!important;
27 | z-index: 99999!important;
28 | max-height: unset!important;
29 |
30 | }
31 |
32 | /*Stay top most*/
33 | #nav-bar:not([urlbar-exceeds-toolbar-bounds]), toolbar[overflowable][customizing]>.customization-target {
34 | overflow: visible!important;
35 | }
36 | :root[sizemode="maximized"] #nav-bar-customization-target:focus-within {
37 | z-index: 99999!important;
38 | }
39 |
40 | /*Hide spacers*/
41 | :root[sizemode="maximized"] toolbarspring {
42 | display: none!important;
43 | }
44 |
45 | /* Move Hamburger menu to left */
46 | :root[sizemode="maximized"] #PanelUI-button, #customization-panel-container, #customization-panelWrapper .panel-arrow {
47 | -moz-box-ordinal-group: 0 !important;
48 | margin-right: -6px !important;
49 | }
50 | :root[sizemode="maximized"] #PanelUI-menu-button {
51 | margin-top: 3px!important;
52 | }
53 | :root[sizemode="maximized"] #nav-bar-overflow-button {
54 | margin-right: 0px!important;
55 | margin-top: 3px!important;
56 | }
57 |
58 |
59 | /*Fix popup margin start for v102 */
60 | panel[type="arrow"][side="top"], panel[type="arrow"][side="bottom"] {
61 | margin-inline: unset!important;
62 | }
63 |
64 | /*Move tracking protection to the right*/
65 |
66 | #tracking-protection-icon-container {
67 | -moz-box-ordinal-group: 2!important;
68 | }
69 |
70 | /* Contextual toolbar buttons, only show on hover
71 | */
72 | :root:not([customizing])[sizemode="maximized"] #PanelUI-button,
73 | :root:not([customizing])[sizemode="maximized"] #nav-bar-overflow-button,
74 | :root:not([customizing])[sizemode="maximized"] #nav-bar-customization-target toolbarbutton {
75 | margin-left: -31px !important;
76 | opacity: 0 !important;
77 | transform: scale(.85, .85) !important;
78 | transition: all 300ms!important;
79 | }
80 | :root:not([customizing])[sizemode="maximized"] :hover>#PanelUI-button,
81 | :root:not([customizing])[sizemode="maximized"] :hover>#nav-bar-overflow-button,
82 | :root:not([customizing])[sizemode="maximized"] :hover>#nav-bar-customization-target toolbarbutton,
83 | :root:not([customizing])[sizemode="maximized"] #nav-bar-customization-target:focus-within #nav-bar toolbarbutton,
84 | :root:not([customizing])[sizemode="maximized"] :hover>.titlebar toolbarbutton {
85 | transform: scale(1, 1) !important;
86 | opacity: 1 !important;
87 | margin-left: 0 !important;
88 | pointer-events: auto !important;
89 | transition: all 300ms !important;
90 | }
91 | #main-window[sizemode="maximized"] #nav-bar:focus-within>#PanelUI-button {
92 | transform: scale(1, 1) !important;
93 | opacity: 1 !important;
94 | margin-left: 0 !important;
95 | pointer-events: auto !important;
96 | transition: all 300ms !important;
97 | }
98 |
--------------------------------------------------------------------------------
/chrome/userChrome-files/vars.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --titlebar-hide: 30px!important;
3 | --sideheader-margin: 37px!important;
4 | --sidebar-padding: -38px;
5 | --tst-roots-gap: 3px!important;
6 | --tst-border-rad: 6px!important;
7 | --tst-height: 34px!important;
8 | --tst-default-color: rgba(1, 41, 41, 1)!important;
9 | --tst-font-size: 13px!important;
10 | --urlbar-foucs-width: 630px!important;
11 | --urlbar_font_size: 15px!important;
12 | }
13 | :root:not([customizing])[sizemode="normal"] {
14 | --navbar-transition-delay: 0.1s!important;
15 | --navbar-transition-duartion: 135ms!important;
16 | }
17 | :root:not([customizing])[uidensity="compact"] {
18 | --top-toolbar-height: -33px!important;
19 | }
20 | :root:not([customizing]):not([uidensity]) {
21 | --top-toolbar-height: -37px!important;
22 | }
23 | :root:not([customizing])[uidensity="touch"] {
24 | --top-toolbar-height: -39px!important;
25 | --sidebar-padding: -49px;
26 | }
27 | :root:not([customizing])[sizemode="normal"][uidensity="compact"] {
28 | --nav-bar-margin: -47px!important;
29 | --bookmark-bar-margin: -22px!important;
30 | }
31 | :root:not([customizing])[sizemode="normal"]:not([uidensity]) {
32 | --nav-bar-margin: -41px!important;
33 | --bookmark-bar-margin: -28px!important;
34 | }
35 | :root:not([customizing])[sizemode="normal"][uidensity=touch] {
36 | --nav-bar-margin: -41px!important;
37 | --bookmark-bar-margin: -34px!important;
38 | }
39 | #urlbar-container {
40 | --urlbar-container-height: 30px !important;
41 | }
--------------------------------------------------------------------------------
/chrome/userChrome-files/vertical_bookmarks_toolbar.css:
--------------------------------------------------------------------------------
1 | /*CREDITS to MrOtherGuy, modified to work on maximized mode only and also adjust zoom control*/
2 | /*UNDER LICENSE OF ORIGINAL SOURCE*/
3 |
4 | /* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/vertical_bookmarks_toolbar.css made available under Mozilla Public License v. 2.0
5 | See the above repository for full license text. */
6 |
7 |
8 | /* Makes bookmarks toolbar appear vertically at the left side of the window */
9 |
10 | :root:not([inFullscreen]){
11 | --uc-vertical-toolbar-width: 35px!important;
12 | }
13 | :root[customizing]{
14 | --uc-vertical-toolbar-width: 105px!important;
15 | }
16 |
17 | #main-window[sizemode="maximized"] #PersonalToolbar {
18 | position: fixed!important;
19 | display: flex!important;
20 | flex-direction: column!important;
21 | left: 0!important;
22 | width: var(--uc-vertical-toolbar-width, 0)!important;
23 | height: 100vh!important;
24 | max-height: 100vh !important;
25 | padding-bottom: 120px !important;
26 | padding-top: 4px!important;
27 | margin-top:calc( -1 * var(--top-toolbar-height) - 1px )!important;
28 |
29 | }
30 | #main-window[sizemode="maximized"] #personal-toolbar-empty{
31 | display:none!important;
32 | }
33 | #main-window[sizemode="maximized"] #PersonalToolbar #PlacesToolbarItems>.bookmark-item {
34 | padding-block: 4px !important;
35 | }
36 | #main-window[sizemode="maximized"] body>#browser, body>#browser-bottombox, :root[sizemode="maximized"] #customization-container {
37 | margin-left: var(--uc-vertical-toolbar-width, 0)!important;
38 | }
39 |
40 | /*Bookmarks fixes ( Hidden by default)*/
41 | :root[sizemode="maximized"] #PersonalToolbar #PlacesToolbarItems {
42 | display: flex!important;
43 | flex-direction: column!important;
44 | }
45 | :root[sizemode="maximized"] #personal-bookmarks {
46 | overflow-y: auto!important;
47 | scrollbar-width: none!important;
48 | }
49 |
50 | /*Hide bookmark items in maximized */
51 | #main-window[sizemode="maximized"] #PlacesToolbar {
52 | display: none!important;
53 | }
54 |
55 |
56 | /*Space between items*/
57 | #PersonalToolbar .toolbarbutton-1 {
58 | padding-block: 8px !important;
59 | margin:0px!important;
60 | margin-right: 0px!important;
61 |
62 | }
63 |
64 |
65 | /*Vertical zoom controls */
66 | #main-window[sizemode="maximized"] #zoom-controls {
67 | opacity: 0.9;
68 | transform: rotate(90deg)!important;
69 | margin-bottom: 90px;
70 | margin-top: -10px;
71 |
72 | }
73 |
74 | :root[customizing][sizemode="maximized"]
75 | #zoom-controls {
76 | margin-top: 0px!important;
77 | margin-left:-45px!important;
78 | margin-bottom: 40px!important;
79 | }
80 |
81 |
82 | #main-window[sizemode="maximized"] #zoom-controls[cui-areatype="toolbar"]>#zoom-reset-button>.toolbarbutton-text {
83 | transform: rotate(180deg)!important;
84 | font-size: 15px!important;
85 | font-family: serif!important;
86 | }
87 |
88 |
--------------------------------------------------------------------------------
/chrome/userChrome.css:
--------------------------------------------------------------------------------
1 |
2 | /*--------------------------------------------
3 | Changes to various elements (optional)
4 | --------------------------------------------*/
5 |
6 | /*--- Restore iconography on main menu ---*/
7 | @import "./userChrome-files/main_menu_icons_restore.css";
8 |
9 | /*--- Status panel styling to fit browser theme ---*/
10 | @import "./userChrome-files/statuspanel.css";
11 |
12 | /*--- Hides many buttons and icons from navbar
13 | and urlbar and also restyles the rest (Optional)
14 | recommended to customize to restore anything you want --- */
15 | @import "./userChrome-files/icons_and_buttons.css";
16 |
17 | /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
18 |
19 |
20 | /*--------------------------------------------
21 | Normal mode styling (optional)
22 | --------------------------------------------*/
23 |
24 | @import "./userChrome-files/normal_mode.css";
25 |
26 | /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
27 |
28 |
29 | /*--------------------------------------------
30 | Maximized mode styling
31 | --------------------------------------------*/
32 |
33 | /*--- Shared variables ---*/
34 | @import "./userChrome-files/vars.css";
35 |
36 | /*--- Creates the no top line style and min - man -max buttons restyle ---*/
37 | @import "./userChrome-files/maximized_mode_tweaks.css";
38 |
39 | /*--- Urlbar styling and tweaking to fit no top line style ---*/
40 | @import "./userChrome-files/urlbar.css";
41 |
42 | /*--- Rotates bookmark toolbar to the left edge of the browser ---*/
43 | @import "./userChrome-files/vertical_bookmarks_toolbar.css";
44 |
45 | /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
46 |
47 |
48 | /*--------------------------------------------
49 | Sidebars styling
50 | --------------------------------------------*/
51 |
52 | /*--- Restyle sidebar header to look like a TST Tab ---*/
53 | @import "./userChrome-files/sidebar_header_tweaks.css";
54 |
55 | /*--- SidebarModoki changes to fit browser theme ---*/
56 | @import "./userChrome-files/sidebar_modoki_style.css";
57 |
58 | /*--- Sidebar floating style ---*/
59 | @import "./userChrome-files/sidebar_floating.css";
60 |
61 | /*--- About:addons changes to fit the sidebar ---*/
62 | @import "./userChrome-files/addons_sidebar.css";
63 | @import "./userChrome-files/shadow-root.as.css";
64 |
65 | /*--- The about:pages overall styles imported to work inside Sidebar Modoki ---*/
66 | @import "./userContent-files/aboutpages/list.css";
67 |
68 | /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
69 |
--------------------------------------------------------------------------------
/chrome/userContent-files/aboutpages/about_pages_Darker.css:
--------------------------------------------------------------------------------
1 | /*Recolors about: pages in dark mode*/
2 |
3 | @media (prefers-color-scheme: dark) {
4 | @-moz-document url-prefix("about:"), url-prefix("chrome://userchromejs/content/aboutconfig/aboutconfig.xhtml"),url-prefix(view-source) {
5 | :root {
6 | --primary-background: rgb(20, 16, 19) !important;
7 | --bg-color: rgb(20,16,19) !important;
8 | --secondary-background: #191516 !important;
9 | --primary-font-color: #BCBCBC !important;
10 | --highlighted-font-color: #FCFCFC !important;
11 | --primary-border: 1px solid #441D37 !important;
12 | --bright-border: 1px solid #512828 !important;
13 | --border-color: #441D37 !important;
14 | --bright-border-color: #512828 !important;
15 | --primary-icon-color: #9DA5B4 !important;
16 | --faded-bright-border-color: rgba(142, 175, 182, .65) !important;
17 | --in-content-border-focus: var(--bright-border-color) !important;
18 | --primary-accent-color: #568AF2 !important;
19 | --in-content-page-background: #110E10;
20 | --in-content-page-color: #BCBCBC !important;
21 | --in-content-box-background-alt: #1F2626 !important;
22 | --in-content-box-info-background: #191E1E !important;
23 | --in-content-button-background: rgb(71, 31, 52) !important;
24 | --in-content-button-background-alt: #3a2c2c !important;
25 | --in-content-box-border-color: #492D2D !important;
26 | --in-content-box-background: #221d21 !important;
27 | --in-content-box-background-op: rgba(40, 40, 40, 0.5) !important;
28 | --in-content-primary-button-background: rgba(50, 100, 100) !important;
29 | --in-content-primary-button-background-hover: rgba(100, 100, 200) !important;
30 | --in-content-primary-button-background-active: #3a2c2c !important;
31 | --in-content-text-color: #BCBCBC !important;
32 | --in-content-focus-outline-color: #492D2D !important;
33 | --search-box: #191E1E !important;
34 | --checkbox-checked-color: rgb(223, 173, 253) !important;
35 | --in-content-item-selected: rgba(90, 70, 70, 1) !important;
36 | --in-content-primary-button-text-color: var(--highlighted-font-color) !important;
37 | --in-content-category-text-hover: HighlightText !important;
38 | --in-content-category-background-hover: Highlight !important;
39 | --in-content-category-text-selected: black !important;
40 | --in-content-category-text-selected: white !important;
41 | --in-content-category-background-selected: rgba(53, 53, 53, 1);
42 | }
43 | @media (min-width: 830px) {
44 | :root {
45 | --in-content-page-background: #110E10!important;
46 | }
47 | }
48 | }
49 | @-moz-document url-prefix("about:preferences") {
50 | h1 {
51 | font-size: 1.5em!important;
52 | font-weight: 900 !important;
53 | }
54 | .main-content {
55 | background-color: var(--primary-background) !important;
56 | color: var(--primary-font-color) !important;
57 | }
58 | .sticky-container {
59 | background-color: var(--primary-background) !important;
60 | }
61 | #categories>.category[selected], #categories>.category.selected {
62 | color: var( --highlighted-font-color) !important;
63 | }
64 | html, h1, #categories {
65 | color: var(--primary-font-color) !important;
66 | }
67 | .navigation, #handersView, #engineShown, #engineName, #engineKeyword, .dialogTitleBar {
68 | background-color: var(--secondary-background) !important;
69 | color: var(--primary-font-color) !important;
70 | }
71 | #searchInput {
72 | background-color: var(--search-box) !important;
73 | color: var(--primary-icon-color) !important;
74 | }
75 | #filter {
76 | background-color: var(--search-box) !important;
77 | color: var(--primary-icon-color) !important;
78 | }
79 | #downloadFolder {
80 | background-color: var(--search-box) !important;
81 | color: var(--primary-icon-color) !important;
82 | }
83 | #typeColumn {
84 | background-color: var(--search-box) !important;
85 | color: var(--primary-icon-color) !important;
86 | }
87 | #actionColumn {
88 | background-color: var(--search-box) !important;
89 | color: var(--primary-icon-color) !important;
90 | }
91 | #handlersView {
92 | background-color: var(--secondary-background) !important;
93 | color: var(--primary-font-color) !important;
94 | }
95 | #applicationsGroup listheader {
96 | background-color: var(--search-box) !important;
97 | }
98 | #contentBlockingOptionStandard, #contentBlockingOptionStrict, #contentBlockingOptionCustom {
99 | background-color: var(--secondary-background) !important;
100 | color: var(--primary-font-color) !important;
101 | border: 0px !important;
102 | }
103 | description {
104 | color: var(--primary-font-color) !important;
105 | }
106 | #engineChildren {
107 | background-color: var(--secondary-background) !important;
108 | color: var(--primary-font-color) !important;
109 | }
110 | .content-blocking-warning {
111 | background: var( --in-content-box-background-alt) !important;
112 | }
113 | .checkbox-check, input[type="checkbox"] {
114 | border: 1px dashed var(--in-content-accent-color) !important;
115 | background-color: transparent !important;
116 | -moz-appearance: none !important;
117 | opacity: 0.7 !important;
118 | }
119 | .checkbox-check[checked] {
120 | opacity: 1 !important;
121 | }
122 | input[type="checkbox"] {
123 | border: 1px dashed var(--in-content-accent-color) !important;
124 | background-color: transparent !important;
125 | -moz-appearance: none !important;
126 | }
127 | .radio-check {
128 | background-color: transparent !important;
129 | }
130 | }
131 |
132 | @-moz-document url-prefix("about:addons") {
133 | #sidebar {
134 | background-color: var(--secondary-background);
135 | }
136 | #full {
137 | color: var(--primary-font-color) !important;
138 | }
139 | .card {
140 | color: var(--primary-font-color) !important;
141 | }
142 | }
143 |
144 | /*about:debugging darker*/
145 | @-moz-document url-prefix(about:debugging) {
146 | :root {
147 | --bg-color: rgb(20, 16, 19) !important;
148 | --box-background: var( --in-content-box-background) !important;
149 | --box-border-color: #512828 !important;
150 | --text-color: var(--primary-font-color) !important;
151 | --caption-20-color: #BCBCBC !important;
152 | --sidebar-selected-color: #BCBCBC !important;
153 | --card-separator-color: rgba(142, 175, 182, .65) !important;
154 | }
155 | .sidebar-item__link, .sidebar-item__link:hover {
156 | color: white !important;
157 | filter: sepia(0.1) !important;
158 | }
159 | .connect-section__header__icon, .connect-section__header__icon, .sidebar__footer__icon, .icon-label__icon {
160 | filter: invert(1) !important;
161 | }
162 | .default-button {
163 | color: var( --highlighted-font-color) !important;
164 | background-color: var(--in-content-button-background-alt) !important;
165 | }
166 | .sidebar__label, .fieldpair__description {
167 | color: var( --primary-font-color) !important;
168 | }
169 | .sidebar-item:not(.sidebar-item--selectable) {
170 | color: var( --primary-font-color) !important;
171 | }
172 | .sidebar {
173 | background-color: var(--secondary-background) !important;
174 | }
175 | .card {
176 | background: var( --in-content-box-background) !important;
177 | }
178 | .fieldpair {
179 | border-color: var(--bright-border-color) !important;
180 | }
181 | }
182 |
183 | @-moz-document url-prefix(view-source) {
184 | *|*:root {
185 | background-color: var(--primary-background) !important;
186 | color: white !important;
187 | }
188 | pre[id]:before,
189 | span[id]:before {
190 | color: var(---primary-font-color) !important;
191 | }
192 |
193 | .highlight .start-tag {
194 | color: #b78cfd !important;
195 | }
196 |
197 | .highlight .end-tag {
198 | color: #b78cfd !important;
199 | }
200 |
201 | .highlight .comment {
202 | color: #86de74 !important;
203 | }
204 |
205 | .highlight .cdata {
206 | color: #CC0066 !important;
207 | }
208 |
209 | .highlight .doctype {
210 | color: steelblue !important;
211 | }
212 |
213 | .highlight .pi {
214 | color: #ff7de9 !important;
215 | }
216 |
217 | .highlight .entity {
218 | color: #dea174 !important;
219 | }
220 |
221 | .highlight .attribute-name {
222 | color: #86de74 !important;
223 | }
224 |
225 | .highlight .attribute-value {
226 | color: #75bfff !important;
227 | }
228 |
229 | .highlight .markupdeclaration {
230 | color: steelblue !important;
231 | font-style: italic !important;
232 | }
233 |
234 | .highlight .error,
235 | .highlight .error > :-moz-any(.start-tag, .end-tag, .comment, .cdata, .doctype,
236 | .pi, .entity, .attribute-name, .attribute-value) {
237 | color: #de7474 !important;
238 | }
239 | }
240 | }
--------------------------------------------------------------------------------
/chrome/userContent-files/aboutpages/aboutaddons/about_addons_restore_buttons.as.css:
--------------------------------------------------------------------------------
1 | /* Source https://github.com/aris-t2/customcssforfx ************************************/
2 |
3 | @-moz-document url-prefix(chrome://mozapps/content/extensions/extensions.xul),
4 | url-prefix(about:addons), url-prefix(chrome://mozapps/content/extensions/aboutaddons.html),
5 | url-prefix(chrome://mozapps/content/extensions/aboutaddons.xhtml) {
6 | /*Applies when width > 830 in order to skip styling addon page on sidebar*/
7 |
8 |
9 | @media (min-width: 830px) {
10 |
11 | #main{
12 | max-width: calc( var(--section-width) + 20vw )!important;
13 |
14 | }
15 | html {
16 | --addon-page-options-width: 340px;
17 | }
18 | /* locales require adjustments */
19 | html[lang="de"] {
20 | --addon-page-options-width: 370px;
21 | }
22 | html:-moz-any([lang="ru"], [lang="it"], [lang="fr"], [lang="el"]) {
23 | --addon-page-options-width: 440px;
24 | }
25 | html[lang*="es-"] {
26 | --addon-page-options-width: 460px;
27 | }
28 | /**/
29 | addon-list[type="theme"] addon-card button[data-l10n-id="enable-addon-button"]:not(.theme-enable-button), .more-options-menu panel-item {
30 | background: white !important;
31 | color: black !important;
32 | margin: 0 1px !important;
33 | border: 1px solid lightgrey !important;
34 | }
35 | addon-list addon-card panel-list * {
36 | background: white !important;
37 | }
38 | addon-list[type="theme"] addon-card button[data-l10n-id="enable-addon-button"]:not(.theme-enable-button):hover, addon-list[type="theme"] addon-card button[data-l10n-id="enable-addon-button"]:not(.theme-enable-button):active {
39 | border: 1px solid black !important;
40 | }
41 | @media (prefers-color-scheme: dark) {
42 | addon-list addon-card panel-list *,
43 | addon-list[type="theme"] addon-card button[data-l10n-id="enable-addon-button"]:not(.theme-enable-button),
44 | .more-options-menu panel-item {
45 | background: black !important;
46 | color: white !important;
47 | }
48 | addon-list[type="theme"] addon-card button[data-l10n-id="enable-addon-button"]:not(.theme-enable-button):hover,
49 | addon-list[type="theme"] addon-card button[data-l10n-id="enable-addon-button"]:not(.theme-enable-button):active {
50 | border: 1px solid white !important;
51 | }
52 | }
53 |
54 | addon-list addon-card panel-list *, addon-list[type="theme"] addon-card button[data-l10n-id="enable-addon-button"]:not(.theme-enable-button), .more-options-menu panel-item {
55 | background: var(--in-content-button-background)!important;
56 | }
57 | @media (prefers-color-scheme: dark) {
58 | addon-list addon-card panel-list *, addon-list[type="theme"] addon-card button[data-l10n-id="enable-addon-button"]:not(.theme-enable-button), .more-options-menu panel-item {
59 | color: white !important;
60 | }
61 | }
62 | :-moz-any(addon-list, panel-list) panel-item {
63 | margin: 0 3px !important;
64 | }
65 | :is(addon-list,panel-list) panel-item{
66 | margin: 0 3px !important;
67 | }
68 | /* reduce size of default buttons */
69 | link:is([href$="panel-item.css"],[href$="panel-list.css"]) ~ button {
70 | width: unset !important;
71 | padding: 6px 6px !important;
72 | }
73 |
74 | /* remove three dots button */
75 | addon-card .more-options-button {
76 | display: none !important;
77 | }
78 |
79 | /* remove button icon */
80 | :host([checked]),
81 | panel-item[checked],
82 | :is(addon-list,panel-list) panel-item {
83 | --icon: unset !important;
84 | }
85 | /* restore buttons */
86 | div.arrow.top + div.list {
87 | display: flex !important;
88 | flex-flow: row wrap !important;
89 | justify-content: flex-start !important;
90 | }
91 | div[role="presentation"].list {
92 | display: flex !important;
93 | flex-flow: row wrap !important;
94 | justify-content: flex-start !important;
95 | }
96 |
97 | panel-item[action="preferences"] {
98 | order: -3;
99 | }
100 | panel-item[action="expand"] {
101 | order: -2;
102 | }
103 | panel-item[badged] {
104 | border: 1px solid Highlight !important;
105 | }
106 | panel-item[badged]::after,
107 | :host([badged]) button::after,
108 | link:is([href$="panel-item.css"],[href$="panel-list.css"]) ~ button::after,
109 | :is(addon-options,plugin-options) button::after {
110 | display: none !important;
111 | content: unset !important;
112 | }
113 |
114 | addon-page-options panel-list {
115 | min-width: unset !important;
116 | width: auto !important;
117 | max-width: var(--addon-page-options-width) !important;
118 | z-index: 1000 !important;
119 | }
120 | addon-page-options panel-list panel-item {
121 | min-width: calc(var(--addon-page-options-width) - 20px) !important;
122 | width: 320px !important;
123 | }
124 | .sticky-container {
125 | z-index: 1000 !important;
126 | }
127 | link:is([href$="panel-item.css"],[href$="panel-list.css"]) ~ button label[accesskey] {
128 | padding-inline-start: 20px !important;
129 | padding-top: 3px !important;
130 | padding-bottom: 3px !important;
131 | min-width: calc(var(--addon-page-options-width) - 10px) !important;
132 | width: calc(var(--addon-page-options-width) - 10px) !important;
133 | }
134 | addon-page-options panel-list panel-item[accesskey][checked] {
135 | background: url("chrome://global/skin/icons/check.svg") 5px no-repeat !important;
136 | }
137 | addon-card panel-list {
138 | position: absolute !important;
139 | display: flex !important;
140 | overflow: hidden !important;
141 | background: unset !important;
142 | border: unset !important;
143 | box-shadow: unset !important;
144 | min-width: unset !important;
145 | width: unset !important;
146 | float: right !important;
147 | right: 68px !important;
148 | }
149 | addon-card panel-list {
150 | margin-top: -56px !important;
151 | }
152 |
153 | .addon-description {
154 | min-height: 22px!important;
155 | }
156 |
157 | addon-card[expanded="true"] .extension-enable-button {
158 | margin-top: 35px !important;
159 | }
160 | addon-card[expanded="true"] panel-list {
161 | margin-top: -35px !important;
162 | }
163 |
164 | addon-card[expanded="true"] .addon.card .theme-enable-button {
165 | margin-top: -10px !important;
166 | }
167 | input[type="checkbox"].toggle-button:checked {
168 | background: var(--in-content-button-background)!important;
169 | }
170 | input[type="checkbox"].toggle-button:hover {
171 | filter: brightness(2.00) !important;
172 | }
173 |
174 | .extension-enable-button::before {
175 | margin-top: 6px!important;
176 | background: none!important;
177 | appearance: dialog;
178 | display: block;
179 | font-size: 12px!important;
180 | position: absolute!important;
181 | width: 50px!important;
182 | color:black;
183 | }
184 |
185 | addon-card:hover .addon.card[active="true"] .theme-enable-button {
186 | background: rgb(250,50,50);
187 | }
188 | addon-card:hover .addon.card[active="false"] .theme-enable-button {
189 | background: rgb(50,250,50);
190 | }
191 | @media (prefers-color-scheme: dark) {
192 | .extension-enable-button::before {
193 | color: white;
194 | }
195 | addon-card .addon.card[active="true"] .theme-enable-button {
196 | filter: brightness(1.20) !important;
197 | }
198 | addon-card:hover .addon.card[active="true"] .theme-enable-button {
199 | background: rgb(150,50,50) !important;
200 | }
201 | addon-card:hover .addon.card[active="false"] .theme-enable-button {
202 | background: rgb(50,150,50) !important;
203 | }
204 | }
205 | .card[active="true"] .extension-enable-button::before {
206 | margin-left: -1px!important;
207 | content: "Disable"!important;
208 | }
209 | .card[active="false"] .extension-enable-button::before {
210 | margin-left: 8px!important;
211 | content: "Enable"!important;
212 | }
213 | .extension-enable-button {
214 | -moz-appearance: none !important;
215 | min-width: 56px !important;
216 | width: 27px !important;
217 | max-width: 20px !important;
218 | height: 28px !important;
219 | font-size: 0 !important;
220 | -moz-margin-end: 1px !important;
221 | opacity: 0.9 !important;
222 | left: 130px;
223 | top: 20px!important;
224 | border-radius: 0px!important;
225 | margin-top: 5px!important;
226 | border: 1px solid rgba(130, 30, 130, 1)!important;
227 |
228 | }
229 |
230 | .theme-enable-button{
231 | margin-top:10px!important;
232 | border-radius: 0px!important;
233 | border: 1px solid rgba(130, 30, 130, 1)!important;
234 | height: 28px !important;
235 |
236 | }
237 | addon-card .addon.card .theme-enable-button:hover {
238 | cursor: pointer !important;
239 | opacity: 1.0 !important;
240 | filter: brightness(1.40) !important;
241 | }
242 | addon-card .card-contents .addon-description {
243 | display: block !important;
244 | mask-image: linear-gradient(to left, transparent, black 10px) !important;
245 | }
246 | /* disable short description on expanded add-ons to prevent button jumping */
247 | addon-card[expanded="true"] .card-contents .addon-description {
248 | display: none !important;
249 | /*position: absolute !important;*/
250 | }
251 | addon-card .addon.card .theme-enable-button, input[type="checkbox"].toggle-button {
252 | -moz-margin-end: 8px !important;
253 | }
254 | .card-contents input[type="checkbox"].toggle-button {
255 | -moz-margin-end: 10px !important;
256 | }
257 | .card-heading-image{
258 | overflow: hidden !important;
259 | margin-top:0px!important;
260 | }
261 | #main > div:-moz-any([current-view="list"], [current-view="updates"]) .addon.card {
262 | position: relative;
263 | display: flex;
264 | flex-wrap: wrap;
265 | }
266 | .addon-card-collapsed {
267 | flex: 1;
268 | min-width: 1px;
269 | }
270 | addon-card .card-contents {
271 | height: unset !important;
272 | }
273 | #main > div:-moz-any([current-view="list"], [current-view="updates"]) .toggle-button {
274 | position: absolute;
275 | right: 8px !important;
276 | }
277 | .addon-card-message {
278 | order: 3;
279 | }
280 | addon-card > .addon.card :-moz-any(addon-options, plugin-options) {
281 | display: block;
282 | position: relative;
283 | overflow: unset !important;
284 | }
285 | #main > div:-moz-any([current-view="list"], [current-view="updates"]) > :-moz-any([type="extension"], [type="all"]) addon-options {
286 | margin-inline-end: 35px;
287 | }
288 | #main > div:not([current-view="detail"]) :-moz-any(addon-options, plugin-options) {
289 | margin-top: -9px;
290 | margin-inline-end: -5px;
291 | }
292 | #main > div[current-view="detail"] addon-details > .tab-group {
293 | display: block !important;
294 | }
295 | #main > div[current-view="detail"] :-moz-any(plugin-options, addon-options) > panel-list {
296 | position: absolute !important;
297 | top: 8px;
298 | right: 0 !important;
299 | }
300 | panel-item[action="expand"] {
301 | display: none!important;
302 | }
303 | panel-item[action="report"] {
304 | display: none!important;
305 | }
306 | searchaddons > search-textbox, #main {
307 | min-width: 40vw!important;
308 | }
309 | addon-card:not([expanded="true"]) .addon.card {
310 | margin-top: 11px !important;
311 | margin-bottom: -2px !important;
312 | padding-top: 3px !important;
313 | padding-bottom: 2px !important;
314 | min-height: 40px !important;
315 | }
316 | .card-heading-icon {
317 | padding: 10px!important;
318 | }
319 | /* remove advertising other add-ons */
320 | recommended-themes-section, recommended-extensions-section {
321 | display: none !important;
322 | }
323 | /*Top header remove waisted space*/
324 | .sticky-container {
325 | display: flex!important;
326 | }
327 | .main-heading {
328 | padding-bottom: 10px!important;
329 | max-width: none!important;
330 | }
331 | .main-search {
332 | padding-top: 0!important;
333 | padding-bottom: 10px!important;
334 | max-width: none!important;
335 | }
336 | /*remove warning*/
337 | .container{
338 | display:none!important;
339 | }
340 | }
341 |
--------------------------------------------------------------------------------
/chrome/userContent-files/aboutpages/aboutaddons/addonlists_colorized_button_icons_fx68.css:
--------------------------------------------------------------------------------
1 | /*SOURCE https://github.com/aris-t2/customcssforfx ************************************/
2 | /****************************************************************************************/
3 |
4 |
5 | @-moz-document url-prefix(chrome://mozapps/content/extensions/extensions.xul),
6 | url-prefix(about:addons),
7 | url-prefix(chrome://mozapps/content/extensions/aboutaddons.html),
8 | url-prefix(chrome://mozapps/content/extensions/aboutaddons.xhtml) {
9 |
10 | panel-item[action="toggle-disabled"][data-l10n-id="disable-addon-button"] {
11 | -moz-context-properties: fill !important;
12 | fill: red !important;
13 | }
14 |
15 | panel-item[action="toggle-disabled"][data-l10n-id="enable-addon-button"] {
16 | -moz-context-properties: fill !important;
17 | fill: green !important;
18 | }
19 |
20 | panel-item[data-l10n-id="remove-addon-button"] {
21 | -moz-context-properties: fill !important;
22 | fill: red !important;
23 | }
24 |
25 | panel-item[data-l10n-id="install-update-button"] {
26 | -moz-context-properties: fill !important;
27 | fill: blue !important;
28 | }
29 |
30 | panel-item[data-l10n-id="preferences-addon-button"] {
31 | -moz-context-properties: fill !important;
32 | fill: grey !important;
33 | }
34 |
35 | panel-item[data-l10n-id="report-addon-button"] {
36 | -moz-context-properties: fill !important;
37 | fill: orange !important;
38 | }
39 |
40 | panel-item[data-l10n-id="expand-addon-button"],
41 | panel-item[data-l10n-id="manage-addon-button"] {
42 | -moz-context-properties: fill !important;
43 | fill: blue !important;
44 | }
45 |
46 | panel-item[data-l10n-id="ask-to-activate-button"] {
47 | -moz-context-properties: fill !important;
48 | fill: red !important;
49 | }
50 |
51 | panel-item[data-l10n-id="always-activate-button"] {
52 | -moz-context-properties: fill !important;
53 | fill: green !important;
54 | }
55 |
56 | panel-item[data-l10n-id="never-activate-button"] {
57 | -moz-context-properties: fill !important;
58 | fill: red !important;
59 | }
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/chrome/userContent-files/aboutpages/aboutaddons/addonlists_show_addon_version_number_fx68.css:
--------------------------------------------------------------------------------
1 | /* SOURCE: https://github.com/aris-t2/customcssforfx ************************************/
2 | /****************************************************************************************/
3 |
4 |
5 | @-moz-document url-prefix(chrome://mozapps/content/extensions/extensions.xul),
6 | url-prefix(about:addons),
7 | url-prefix(chrome://mozapps/content/extensions/aboutaddons.html),
8 | url-prefix(chrome://mozapps/content/extensions/aboutaddons.xhtml) {
9 | @media (min-width: 830px) {
10 |
11 | /*restore version number */
12 | div:not([current-view="updates"]) .addon-name-link[title]:not([data-l10n-args])::after,
13 | div:not([current-view="updates"]) .addon-name[title]:not([data-l10n-args])::after {
14 | display: block !important;
15 | content: attr(title) !important;
16 | margin-top: -22px !important;
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/chrome/userContent-files/aboutpages/aboutaddons/addons_manager_alternative_appearance_fx75.css:
--------------------------------------------------------------------------------
1 |
2 | /*utilize wasted screen space*/
3 |
4 | @-moz-document url-prefix(chrome://mozapps/content/extensions/extensions.xul),
5 | url-prefix(about:addons),
6 | url-prefix(chrome://mozapps/content/extensions/aboutaddons.html),
7 | url-prefix(chrome://mozapps/content/extensions/aboutaddons.xhtml) {
8 |
9 |
10 | .category[is="discover-button"]{
11 | display: none!important;
12 | }
13 |
14 | @media (min-width: 830px) {
15 | #main{
16 | max-width: calc( var(--section-width) + 20vw )!important;
17 |
18 | }
19 | }
20 | }
21 |
22 | /* SOURCE: https://github.com/aris-t2/customcssforfx ************************************/
23 | /****************************************************************************************/
24 |
25 | @media(prefers-color-scheme: dark) {
26 | @-moz-document url-prefix(chrome://mozapps/content/extensions/extensions.xul),
27 | url-prefix(about:addons),
28 | url-prefix(chrome://mozapps/content/extensions/aboutaddons.html),
29 | url-prefix(chrome://mozapps/content/extensions/aboutaddons.xhtml) {
30 |
31 |
32 |
33 |
34 | #categories .category:hover {
35 | color: var(--in-content-category-text-hover) !important;
36 | background-color: var(--in-content-category-background-hover) !important;
37 | }
38 |
39 | #categories .category[selected],
40 | #categories .category.selected,
41 | #categories .category[selected]:hover,
42 | #categories .category.selected:hover,
43 | #categories .category[selected]:hover:active,
44 | #categories .category.selected:hover:active {
45 | color: var(--in-content-category-text-selected) !important;
46 | background-color: var(--in-content-category-background-selected) !important;
47 | }
48 |
49 |
50 | #preferencesButton {
51 | fill: #8b8b8b !important;
52 | }
53 |
54 | #help-button {
55 | fill: #ff0000 !important;
56 | }
57 |
58 |
59 |
60 |
61 | /* colorize category icons */
62 | #categories .category[name="search"],
63 | #category-search .category-icon {
64 | fill: #8aa8cc !important;
65 | }
66 |
67 | #categories .category[name="discover"],
68 | #category-discover .category-icon {
69 | fill: #8b8b8b !important;
70 | }
71 |
72 | #categories .category[name="extension"],
73 | #category-extension .category-icon {
74 | fill: #63c54f !important;
75 | }
76 |
77 | #categories .category[name="theme"],
78 | #category-theme .category-icon {
79 | fill: #ffba2f !important;
80 | }
81 |
82 | #categories .category[name="plugin"],
83 | #category-plugin .category-icon {
84 | fill: #2b63c1 !important;
85 | }
86 |
87 | #categories .category[name="dictionary"],
88 | #category-dictionary .category-icon {
89 | fill: purple !important;
90 | }
91 |
92 | #categories .category[name="legacy"],
93 | #category-legacy .category-icon {
94 | fill: red !important;
95 | }
96 | #categories .category[name="available-updates"],
97 | #category-availableUpdates .category-icon {
98 | fill: orange !important;
99 | }
100 | #categories .category[name="recent-updates"],
101 | #category-recentUpdates .category-icon {
102 | fill: #b99c16 !important;
103 | }
104 |
105 |
106 |
107 |
108 | }
109 | }
110 |
111 | }
112 |
--------------------------------------------------------------------------------
/chrome/userContent-files/aboutpages/aboutaddons/recentupdates_category_always_visible.css:
--------------------------------------------------------------------------------
1 | /* SOURCE: https://github.com/aris-t2/customcssforfx ************************************/
2 | /****************************************************************************************/
3 |
4 | @-moz-document url-prefix(chrome://mozapps/content/extensions/extensions.xul),
5 | url-prefix(about:addons),
6 | url-prefix(chrome://mozapps/content/extensions/aboutaddons.html),
7 | url-prefix(chrome://mozapps/content/extensions/aboutaddons.xhtml) {
8 | #categories .category[name="recent-updates"][disabled],
9 | #category-recentUpdates[disabled] {
10 | overflow: visible !important;
11 | height: 48px !important;
12 | min-height: 48px !important;
13 | opacity: 1 !important;
14 | transition-property: unset !important;
15 | transition-duration: unset !important;
16 | -moz-user-input: unset !important;
17 | }
18 |
19 | #categories .category[name="recent-updates"][hidden],
20 | #category-recentUpdates[hidden] {
21 | opacity: 1 !important;
22 | min-height: 48px !important;
23 | height: 48px !important;
24 | display: inherit !important;
25 | transition: unset !important;
26 | }
27 |
28 | }
--------------------------------------------------------------------------------
/chrome/userContent-files/aboutpages/aboutperformance.css:
--------------------------------------------------------------------------------
1 | /*about:performance recolour and margin fix*/
2 | @-moz-document url-prefix(about:performance) {
3 | @media (prefers-color-scheme: dark) {
4 | html, #dispatch-table {
5 | background:none!Important;
6 | }
7 | #dispatch-thead>tr>td {
8 | background-color: rgba(0, 1, 1, 0);
9 | backdrop-filter: blur(10px);
10 | }
11 | td {
12 | color: rgba(255, 220, 220, 0.7)!important;
13 | }
14 | }
15 | #column-name {
16 | padding-right: 60px!important;
17 | }
18 | #column-type {
19 | padding-right: 0px!important;
20 | }
21 | td {
22 | min-width: 10px!Important;
23 | width: 20px!Important;
24 | }
25 | }
--------------------------------------------------------------------------------
/chrome/userContent-files/aboutpages/list.css:
--------------------------------------------------------------------------------
1 |
2 |
3 | @import "about_pages_Darker.css";
4 |
5 | @import "aboutperformance.css";
6 |
7 | @import "./aboutaddons/about_addons_restore_buttons.as.css";
8 | @import "./aboutaddons/addons_manager_alternative_appearance_fx75.css";
9 | @import "./aboutaddons/addonlists_colorized_button_icons_fx68.css";
10 | @import "./aboutaddons/recentupdates_category_always_visible.css";
11 | @import "./aboutaddons/addonlists_show_addon_version_number_fx68.css";
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/chrome/userContent-files/treestyletab.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --active-tab-text-color: rgb(237, 232, 232)!important;
3 | --tab-text-regular: rgb(173, 175, 179, 1)!important;
4 | --tab-text-active: rgb(237, 232, 232)!important;
5 | --tab-like-surface: transparent!important;
6 | --tab-margin-left: 5px!important;
7 | --tab-margin-right: 10px!important;
8 | --tab-top-margin: 10px!important;
9 | --favicon-margin-left: 8px!important;
10 | }
11 | /* Fix background for right side position sidebar with left side style,
12 | using right side style background */
13 | #background {
14 | /* background-image: var(--sidebar-background-image)!important; */
15 | background-position: right!important;
16 | background-size: var(--browser-background-image-size, auto)!important;
17 | background-size: cover!important;
18 | }
19 | .have-pinned-tabs {
20 | --visual-gap-offset: 15px!important;
21 | }
22 |
23 | /* Tab style */
24 | tab-item tab-item-substance {
25 | border-radius: var(--tst-border-rad)!important;
26 | filter: brightness(0.95) saturate(1) opacity(0.9) contrast(1)!important;
27 | }
28 | tab-item[aria-selected="false"] tab-item-substance {
29 | background-clip: text!important;
30 | position: relative!important;
31 | }
32 | tab-item {
33 | backdrop-filter: blur(3px)!important;
34 | }
35 | tab-item tab-item-substance:after {
36 | content: ' '!important;
37 | display: block!important;
38 | position: absolute!important;
39 | left: 0!important;
40 | top: 0!important;
41 | width: 100%!important;
42 | height: 100%!important;
43 | opacity: 0.7!important;
44 | background-color: inherit!important;
45 | background-clip: border-box!important;
46 | background-repeat: no-repeat!important;
47 | background-position: 50% 0!important;
48 | background-size: cover!important;
49 | }
50 | .label {
51 | margin-left: 5px!important;
52 | text-align: justify!important;
53 | font-size: var(--tst-font-size)!important;
54 | /*Cause right click menu to not work*/
55 | pointer-events:none!important;
56 | }
57 | .front{
58 | left:0!important;
59 | background:none!important;
60 | }
61 | tab-item:not(collapsed) tab-item-substance {
62 | height: var(--tst-height)!important;
63 | margin-top: var(--tst-roots-gap)!important;
64 | }
65 | /*About pages tab color*/
66 | tab-item[data-current-uri^="about"] tab-item-substance {
67 | background-color: rgba(80, 51, 61, 0.9)!important;
68 | }
69 | /*New tab page color*/
70 | tab-item[data-title="New Tab"] tab-item-substance {
71 | background-color: var(--tst-default-color)!important;
72 | }
73 | tab-item:hover[data-title="New Tab"] .background {
74 | background-color: black!important;
75 | }
76 | tab-item[data-title="New Tab"][aria-selected="true"] tab-item-substance {
77 | background-color: rgba(28, 24, 31, 1)!important;
78 | }
79 |
80 | tab-item:not(collapsed,.pinned)[data-level="0"] {
81 | margin-top: var(--tab-top-margin) !important;
82 | margin-bottom: 0px!important;
83 | margin-left: 4px!important;
84 | }
85 | tab-item:not(collapsed,.pinned) {
86 | margin-top: 1px;
87 | }
88 | tab-item:not(collapsed).background {
89 | box-shadow: none!important;
90 | }
91 |
92 | /*Pinned tabs fixes */
93 | tab-item.pinned {
94 | margin-top: calc( 31px) !important;
95 | margin-left: var(--tab-margin-left)!important;
96 | margin-right: var(--tab-margin-right)!important;
97 | min-width:30px!important;
98 | }
99 | /*Selected tab background to be used together with treetab_animated_gradient_border.css */
100 | tab-item[aria-selected="true"] .background {
101 | background: none!important;
102 | }
103 | @media (prefers-color-scheme: dark) {
104 | tab-item[aria-selected="true"] tab-item-substance {
105 | z-index: 10!important;
106 | box-shadow: 1px px 3px 2px var(--active-tab-color-shadow)!important;
107 | filter: brightness(1) saturate(1) opacity(1)!important;
108 | }
109 | }
110 | @media (prefers-color-scheme: light) {
111 | tab-item[aria-selected="true"] tab-item-substance {
112 | z-index: 10!important;
113 | filter: invert(1) brightness(1.3) saturate(1) opacity(1)!important;
114 | }
115 | tab-item[aria-selected="true"] .background {
116 | filter: invert(0.4) brightness(1.3) saturate(1.5) opacity(1)!important;
117 | }
118 | tab-item:not(collapsed) tab-item-substance {
119 | filter: invert(0.9)!important;
120 | }
121 | tab-item:hover {
122 | filter: invert(1) brightness(1.2) saturate(1) opacity(1)!important;
123 | }
124 | }
125 | /**/
126 |
127 | /* Hide child counter for collapsed parent */
128 | tab-counter {
129 | display: none!important;
130 | }
131 |
132 | /**/
133 |
134 | /* Tab favicon fixes */
135 |
136 | tab-item:not(collapsed,.faviconized) tab-favicon {
137 | margin-left: var(--favicon-margin-left)!important;
138 | margin-top: 3px!important;
139 | margin-right: 2px!important;
140 | }
141 |
142 | /* Tab favicon fade inactive */
143 | @media (prefers-color-scheme: dark) {
144 | tab-item:not(collapsed) tab-favicon {
145 | filter: contrast(1) brightness(1.3) saturate(0.5)!important;
146 | }
147 | tab-item[aria-selected="true"] tab-favicon {
148 | filter: grayscale(0) brightness(1)!important;
149 | }
150 | }
151 | @media (prefers-color-scheme: light) {
152 | tab-item:not(collapsed) tab-favicon {
153 | filter: invert(1) brightness(0.7)!important;
154 | }
155 | tab-item[aria-selected="true"] tab-favicon {
156 | filter: invert(1)!important;
157 | }
158 | :root.simulate-svg-context-fill tab-item .favicon-builtin::before {
159 | filter: invert(1)!important;
160 | }
161 | }
162 | /**/
163 |
164 | /* Twisty styling */
165 | /* Show only on hover */
166 | tab-item tab-twisty {
167 | margin-right: 0em!important;
168 | opacity: 0!important;
169 | position: absolute!important;
170 | z-index: 10000!important;
171 | left: calc( var(--favicon-margin-left) + 3px)!important;
172 | }
173 | tab-item:hover tab-twisty {
174 | margin-right: 0em!important;
175 | }
176 | tab-twisty:hover {
177 | background-color: inherit!important;
178 | opacity: 1 !important;
179 | }
180 | tab-item:not(collapsed)[aria-selected="true"] tab-twisty:hover {
181 | filter: unset!important;
182 | }
183 | /*Show on collapsed subtree parent */
184 | tab-item:not(collapsed).subtree-collapsed tab-twisty {
185 | margin-right: 0em !important;
186 | opacity: 1 !important;
187 | position: relative!important;
188 | left: 0px!important;
189 | }
190 | tab-item:not(collapsed)[aria-selected="true"] tab-twisty {
191 | background-color: inherit!important;
192 | }
193 |
194 | /**/
195 |
196 | /* Hide close button , display on hover */
197 | #tabbar tab-item:not(:hover) tab-closebox {
198 | display: none!important;
199 | }
200 |
201 | /* Hide close button on Sound playing tab ,
202 | they close only with right click menu option
203 | or middle click */
204 | tab-item:not(collapsed).sound-playing tab-closebox, tab-item:not(collapsed).has-sound-playing-member.subtree-collapsed[data-child-ids] tab-closebox, tab-item:not(collapsed).muted tab-closebox, tab-item:not(collapsed).has-muted-member.subtree-collapsed[data-child-ids] tab-closebox {
205 | display: none!important;
206 | }
207 | /**/
208 |
209 | /* Display container line as a thin line on top */
210 | .contextual-identity-marker {
211 | position: absolute!important;
212 | width: 130% !important;
213 | height: 1px!important;
214 | top: -1px !important;
215 | scale: 421%!important;
216 | opacity: 0.2!important;
217 | }
218 | /**/
219 |
220 | /* Hide scrollbar */
221 | #tabbar.overflow {
222 | scrollbar-width: none!important;
223 | }
224 | /**/
225 |
226 | /* New tab button */
227 | .newtab-button-box {
228 | /* display: none!important; */
229 | margin-top: 10px!important;
230 | opacity: 0.3!important;
231 | }
232 |
233 |
234 | /*Make the sound playing tab blink */
235 | @media (prefers-color-scheme: dark) {
236 | @keyframes blink-animation {
237 | 0% {
238 | filter: brightness(1) opacity(0.9)!important;
239 | }
240 | 50% {
241 | filter: brightness(1) opacity(0.9)!important;
242 | }
243 | 80% {
244 | filter: brightness(1.3) opacity(1)!important;
245 | }
246 | 100% {
247 | filter: brightness(1) opacity(0.9)!important;
248 | }
249 | }
250 | }
251 | @media (prefers-color-scheme: light) {
252 | /*Make the sound playing tab blink */
253 | @keyframes blink-animation {
254 | 0% {
255 | filter: brightness(0.7) opacity(0.9) invert(0.9)!important;
256 | }
257 | 50% {
258 | filter: brightness(0.8) opacity(1) invert(0.9)!important;
259 | }
260 | 100% {
261 | filter: brightness(0.7) opacity(0.9) invert(0.9)!important;
262 | }
263 | }
264 | }
265 | tab-item:not(collapsed, :hover).sound-playing[aria-selected="false"], tab-item:not(collapsed, :hover).has-sound-playing-member.subtree-collapsed[data-child-ids] {
266 | animation: blink-animation 1.5s infinite!important;
267 | }
268 | /*Makes Sound icon larger*/
269 | .sound-button {
270 | transform: scale(1.3)!important;
271 | fill: rgb(255, 255, 255)!important;
272 | filter: brightness(11)!important;
273 | }
274 | }
275 |
--------------------------------------------------------------------------------
/chrome/userContent-files/treetab_animated_gradient_border.css:
--------------------------------------------------------------------------------
1 | /* Remade for TST from https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/tabs_animated_gradient_border.css
2 | See for the above repository for full license text.*/
3 |
4 | /*Animation*/
5 |
6 | @keyframes rotate-gradient {
7 | from {
8 | background-position: 0 0;
9 | }
10 | to {
11 | background-position: 100vw 0;
12 | }
13 | }
14 |
15 | /**/
16 |
17 | /*Make tab background a rotating gradient*/
18 | tab-item[aria-selected="true"] .background::before {
19 | content: ""!important;
20 | display: block!important;
21 | position: absolute!important;
22 | width: 100vw!important;
23 | height: 100%!important;
24 | background-image: linear-gradient(to right, magenta, #740000, #CDAE3A, #154700, cyan, blue, magenta)!important;
25 | animation: rotate-gradient 7s steps(75) infinite;
26 | pointer-events: none!important;
27 | z-index: -1!important;
28 | filter: brightness(1.5)!important;
29 | transform: scale(2)!important;
30 | }
31 |
32 | /*Make sure background stays behind*/
33 |
34 | tab-item .background {
35 | z-index: -1!important;
36 |
37 | }
38 |
39 | /*Add the background colour in the extra-item-container and scale it*/
40 |
41 | tab-item[aria-selected="true"] .extra-items-container {
42 | z-index: 2!important;
43 | background: inherit!important;
44 | margin:1px!important;
45 | border: 1px solid transparent!important;
46 | border-radius: 6px!important;
47 |
48 | }
49 | /**/
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/chrome/userContent.css:
--------------------------------------------------------------------------------
1 | /********************************************/
2 |
3 |
4 | /*About:pages styling */
5 | @import "./userContent-files/aboutpages/list.css";
6 |
7 | /* Shared variables */
8 | @import "./userChrome-files/vars.css";
9 |
10 |
11 | /*--- Tree Style Tab tweaks and styling ---*/
12 |
13 |
14 | /*EXTRA FOLLOW STEPS*/
15 | @import "./userContent-files/treestyletab.css";
16 |
17 | /*Adds to Tree Style Tab selected tab an animated gradient border*/
18 |
19 | @import "./userContent-files/treetab_animated_gradient_border.css";
20 |
21 | /*Required*/
22 | :root {
23 | --sideheader-margin: 37px;
24 | --tab-top-margin: 10px!important;
25 | }
26 | tab-item:not(collapsed,.pinned)[data-level="0"] {
27 | margin-top: var(--tab-top-margin) !important;
28 | }
29 | #tabbar-container {
30 | margin-top: calc(var(--sideheader-margin))!important;
31 | }
32 |
33 | /*f110 remove trash can icon*/
34 | @-moz-document url-prefix(about:addons) {
35 | panel-item[action="remove"]::part(button) {
36 | background-image: none!important;
37 | }
38 | }
39 | /*Text Selection / highlight colour*/
40 |
41 | @media (prefers-color-scheme: dark) {
42 | ::selection {
43 | color: rgba(0, 0, 0, 1)!important;
44 | background: rgba(160, 30, 40, 1)!important;
45 | font-weight: 400!important;
46 | }
47 | }
48 | @media (prefers-color-scheme: light) {
49 | ::selection {
50 | color: white!important;
51 | background: rgba(100, 100, 100, 1)!important;
52 | font-weight: 400!important;
53 | }
54 | }
55 |
56 |
57 | /*Scroll bar colour for scrollbars escaping FloatingScrollbar.uc.js*/
58 |
59 | * {
60 | scrollbar-color: rgba(77, 77, 77, .4) rgba(0, 0, 0, 0);
61 | }
62 |
63 |
64 | /*White flash fix */
65 |
66 | @media (prefers-color-scheme: dark) {
67 | .browserContainer {
68 | background-color: rgb(23, 23, 23) !important;
69 | }
70 | #tabbrowser-tabpanels {
71 | background-color: rgb(23, 23, 23) !important;
72 | }
73 | html.no-js {
74 | background-color: rgb(23, 23, 23) !important;
75 | }
76 | }
77 | /********************************************/
78 |
--------------------------------------------------------------------------------
/chrome/utils/aboutconfig/aboutconfig.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | Changing these advanced settings can be harmful to the stability, security, and performance of this application. You should only continue if you are sure of what you are doing.
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
71 |
72 |
74 |
75 |
84 |
87 |
88 |
90 |
91 |
93 |
94 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/chrome/utils/aboutconfig/config.css:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | #warningScreen {
6 | font-size: 15px;
7 | padding-top: 0;
8 | padding-bottom: 0;
9 | padding-inline-start: calc(48px + 4.6em);
10 | padding-inline-end: 48px;
11 | }
12 | .title {
13 | background-image: url("chrome://global/skin/icons/warning.svg");
14 | fill: #fcd100;
15 | }
16 | #warningTitle {
17 | font-weight: lighter;
18 | line-height: 1.2;
19 | margin: 0;
20 | margin-bottom: .5em;
21 | }
22 | #warningText {
23 | margin: 1em 0;
24 | }
25 | #warningButton {
26 | margin-top: 0.6em;
27 | }
28 | #filterRow {
29 | margin-top: 4px;
30 | margin-inline-start: 4px;
31 | }
32 | #configTree {
33 | margin-top: 4px;
34 | margin-bottom: 4px;
35 | }
36 | #configTreeBody::-moz-tree-cell-text(user) {
37 | font-weight: bold;
38 | }
39 | #configTreeBody::-moz-tree-cell-text(locked) {
40 | font-style: italic;
41 | }
42 | :root {
43 | --in-content-page-background: rgba(111, 1, 1, 0)!important;
44 | }
45 | body {
46 | background: none!important;
47 | }
48 | tree {
49 | color: var(--primary-font-color)!important;
50 | background: none!important;
51 | background-color: rgba(3, 3, 3, 0)!important;
52 | appearance: none;
53 | }
54 | treechildren::-moz-tree-row {
55 | color: var(--primary-font-color)!important;
56 | background: none!important;
57 | background-color: rgba(70, 76, 79, 0.3);
58 | appearance: none;
59 | }
60 | #savedsignons>hbox:nth-child(1) {
61 | background: none!important;
62 | appearance: none!important;
63 | }
64 | search-textbox {
65 | background: none!important;
66 | appearance: none!important;
67 | }
68 | #filter {
69 | background: none!important;
70 | }
71 | treecol {
72 | background: none!important;
73 | appearance: none!important;
74 | }
75 | treechildren {
76 | background: none!important;
77 | background-color: rgba(70, 76, 79, 0.3);
78 | appearance: none!important;
79 | }
80 | treechildren::-moz-tree-row(odd) {
81 | background: none;
82 | background-color: rgba(140, 56, 119, 0.1)!important;
83 | appearance: none;
84 | }
85 | #SignonViewerDialog, body {
86 | background: none!important;
87 | }
88 | button {
89 | background: var(--in-content-button-background-alt)!important;
90 | appearance: none!important;
91 | }
--------------------------------------------------------------------------------
/chrome/utils/aboutconfig/config.js:
--------------------------------------------------------------------------------
1 | // -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
2 |
3 | /* This Source Code Form is subject to the terms of the Mozilla Public
4 | * License, v. 2.0. If a copy of the MPL was not distributed with this
5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 |
7 | const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
8 |
9 | const nsIPrefLocalizedString = Ci.nsIPrefLocalizedString;
10 | const nsISupportsString = Ci.nsISupportsString;
11 | const nsIPrefBranch = Ci.nsIPrefBranch;
12 | const nsIClipboardHelper = Ci.nsIClipboardHelper;
13 |
14 | const nsClipboardHelper_CONTRACTID = "@mozilla.org/widget/clipboardhelper;1";
15 |
16 | const gPrefBranch = Services.prefs;
17 | const gClipboardHelper = Cc[nsClipboardHelper_CONTRACTID].getService(
18 | nsIClipboardHelper
19 | );
20 |
21 | var gLockProps = ["default", "user", "locked"];
22 | // we get these from a string bundle
23 | var gLockStrs = [];
24 | var gTypeStrs = [];
25 |
26 | const PREF_IS_DEFAULT_VALUE = 0;
27 | const PREF_IS_MODIFIED = 1;
28 | const PREF_IS_LOCKED = 2;
29 |
30 | var gPrefHash = {};
31 | var gPrefArray = [];
32 | var gPrefView = gPrefArray; // share the JS array
33 | var gSortedColumn = "prefCol";
34 | var gSortFunction = null;
35 | var gSortDirection = 1; // 1 is ascending; -1 is descending
36 | var gFilter = null;
37 |
38 | var view = {
39 | get rowCount() {
40 | return gPrefView.length;
41 | },
42 | getCellText(index, col) {
43 | if (!(index in gPrefView)) {
44 | return "";
45 | }
46 |
47 | var value = gPrefView[index][col.id];
48 |
49 | switch (col.id) {
50 | case "lockCol":
51 | return gLockStrs[value];
52 | case "typeCol":
53 | return gTypeStrs[value];
54 | default:
55 | return value;
56 | }
57 | },
58 | getRowProperties(index) {
59 | return "";
60 | },
61 | getCellProperties(index, col) {
62 | if (index in gPrefView) {
63 | return gLockProps[gPrefView[index].lockCol];
64 | }
65 |
66 | return "";
67 | },
68 | getColumnProperties(col) {
69 | return "";
70 | },
71 | treebox: null,
72 | selection: null,
73 | isContainer(index) {
74 | return false;
75 | },
76 | isContainerOpen(index) {
77 | return false;
78 | },
79 | isContainerEmpty(index) {
80 | return false;
81 | },
82 | isSorted() {
83 | return true;
84 | },
85 | canDrop(index, orientation) {
86 | return false;
87 | },
88 | drop(row, orientation) {},
89 | setTree(out) {
90 | this.treebox = out;
91 | },
92 | getParentIndex(rowIndex) {
93 | return -1;
94 | },
95 | hasNextSibling(rowIndex, afterIndex) {
96 | return false;
97 | },
98 | getLevel(index) {
99 | return 1;
100 | },
101 | getImageSrc(row, col) {
102 | return "";
103 | },
104 | toggleOpenState(index) {},
105 | cycleHeader(col) {
106 | var index = this.selection.currentIndex;
107 | if (col.id == gSortedColumn) {
108 | gSortDirection = -gSortDirection;
109 | gPrefArray.reverse();
110 | if (gPrefView != gPrefArray) {
111 | gPrefView.reverse();
112 | }
113 | if (index >= 0) {
114 | index = gPrefView.length - index - 1;
115 | }
116 | } else {
117 | var pref = null;
118 | if (index >= 0) {
119 | pref = gPrefView[index];
120 | }
121 |
122 | var old = document.getElementById(gSortedColumn);
123 | old.removeAttribute("sortDirection");
124 | gPrefArray.sort((gSortFunction = gSortFunctions[col.id]));
125 | if (gPrefView != gPrefArray) {
126 | gPrefView.sort(gSortFunction);
127 | }
128 | gSortedColumn = col.id;
129 | if (pref) {
130 | index = getViewIndexOfPref(pref);
131 | }
132 | }
133 | col.element.setAttribute(
134 | "sortDirection",
135 | gSortDirection > 0 ? "ascending" : "descending"
136 | );
137 | this.treebox.invalidate();
138 | if (index >= 0) {
139 | this.selection.select(index);
140 | this.treebox.ensureRowIsVisible(index);
141 | }
142 | },
143 | selectionChanged() {},
144 | cycleCell(row, col) {},
145 | isEditable(row, col) {
146 | return false;
147 | },
148 | setCellValue(row, col, value) {},
149 | setCellText(row, col, value) {},
150 | isSeparator(index) {
151 | return false;
152 | },
153 | };
154 |
155 | // find the index in gPrefView of a pref object
156 | // or -1 if it does not exist in the filtered view
157 | function getViewIndexOfPref(pref) {
158 | var low = -1,
159 | high = gPrefView.length;
160 | var index = (low + high) >> 1;
161 | while (index > low) {
162 | var mid = gPrefView[index];
163 | if (mid == pref) {
164 | return index;
165 | }
166 | if (gSortFunction(mid, pref) < 0) {
167 | low = index;
168 | } else {
169 | high = index;
170 | }
171 | index = (low + high) >> 1;
172 | }
173 | return -1;
174 | }
175 |
176 | // find the index in gPrefView where a pref object belongs
177 | function getNearestViewIndexOfPref(pref) {
178 | var low = -1,
179 | high = gPrefView.length;
180 | var index = (low + high) >> 1;
181 | while (index > low) {
182 | if (gSortFunction(gPrefView[index], pref) < 0) {
183 | low = index;
184 | } else {
185 | high = index;
186 | }
187 | index = (low + high) >> 1;
188 | }
189 | return high;
190 | }
191 |
192 | // find the index in gPrefArray of a pref object
193 | function getIndexOfPref(pref) {
194 | var low = -1,
195 | high = gPrefArray.length;
196 | var index = (low + high) >> 1;
197 | while (index > low) {
198 | var mid = gPrefArray[index];
199 | if (mid == pref) {
200 | return index;
201 | }
202 | if (gSortFunction(mid, pref) < 0) {
203 | low = index;
204 | } else {
205 | high = index;
206 | }
207 | index = (low + high) >> 1;
208 | }
209 | return index;
210 | }
211 |
212 | function getNearestIndexOfPref(pref) {
213 | var low = -1,
214 | high = gPrefArray.length;
215 | var index = (low + high) >> 1;
216 | while (index > low) {
217 | if (gSortFunction(gPrefArray[index], pref) < 0) {
218 | low = index;
219 | } else {
220 | high = index;
221 | }
222 | index = (low + high) >> 1;
223 | }
224 | return high;
225 | }
226 |
227 | var gPrefListener = {
228 | observe(subject, topic, prefName) {
229 | if (topic != "nsPref:changed") {
230 | return;
231 | }
232 |
233 | var arrayIndex = gPrefArray.length;
234 | var viewIndex = arrayIndex;
235 | var selectedIndex = view.selection.currentIndex;
236 | var pref;
237 | var updateView = false;
238 | var updateArray = false;
239 | var addedRow = false;
240 | if (prefName in gPrefHash) {
241 | pref = gPrefHash[prefName];
242 | viewIndex = getViewIndexOfPref(pref);
243 | arrayIndex = getIndexOfPref(pref);
244 | fetchPref(prefName, arrayIndex);
245 | // fetchPref replaces the existing pref object
246 | pref = gPrefHash[prefName];
247 | if (viewIndex >= 0) {
248 | // Might need to update the filtered view
249 | gPrefView[viewIndex] = gPrefHash[prefName];
250 | view.treebox.invalidateRow(viewIndex);
251 | }
252 | if (gSortedColumn == "lockCol" || gSortedColumn == "valueCol") {
253 | updateArray = true;
254 | gPrefArray.splice(arrayIndex, 1);
255 | if (gFilter && gFilter.test(pref.prefCol + ";" + pref.valueCol)) {
256 | updateView = true;
257 | gPrefView.splice(viewIndex, 1);
258 | }
259 | }
260 | } else {
261 | fetchPref(prefName, arrayIndex);
262 | pref = gPrefArray.pop();
263 | updateArray = true;
264 | addedRow = true;
265 | if (gFilter && gFilter.test(pref.prefCol + ";" + pref.valueCol)) {
266 | updateView = true;
267 | }
268 | }
269 | if (updateArray) {
270 | // Reinsert in the data array
271 | var newIndex = getNearestIndexOfPref(pref);
272 | gPrefArray.splice(newIndex, 0, pref);
273 |
274 | if (updateView) {
275 | // View is filtered, reinsert in the view separately
276 | newIndex = getNearestViewIndexOfPref(pref);
277 | gPrefView.splice(newIndex, 0, pref);
278 | } else if (gFilter) {
279 | // View is filtered, but nothing to update
280 | return;
281 | }
282 |
283 | if (addedRow) {
284 | view.treebox.rowCountChanged(newIndex, 1);
285 | }
286 |
287 | // Invalidate the changed range in the view
288 | var low = Math.min(viewIndex, newIndex);
289 | var high = Math.max(viewIndex, newIndex);
290 | view.treebox.invalidateRange(low, high);
291 |
292 | if (selectedIndex == viewIndex) {
293 | selectedIndex = newIndex;
294 | } else if (selectedIndex >= low && selectedIndex <= high) {
295 | selectedIndex += newIndex > viewIndex ? -1 : 1;
296 | }
297 | if (selectedIndex >= 0) {
298 | view.selection.select(selectedIndex);
299 | if (selectedIndex == newIndex) {
300 | view.treebox.ensureRowIsVisible(selectedIndex);
301 | }
302 | }
303 | }
304 | },
305 | };
306 |
307 | function prefObject(prefName, prefIndex) {
308 | this.prefCol = prefName;
309 | }
310 |
311 | prefObject.prototype = {
312 | lockCol: PREF_IS_DEFAULT_VALUE,
313 | typeCol: nsIPrefBranch.PREF_STRING,
314 | valueCol: "",
315 | };
316 |
317 | function fetchPref(prefName, prefIndex) {
318 | var pref = new prefObject(prefName);
319 |
320 | gPrefHash[prefName] = pref;
321 | gPrefArray[prefIndex] = pref;
322 |
323 | if (gPrefBranch.prefIsLocked(prefName)) {
324 | pref.lockCol = PREF_IS_LOCKED;
325 | } else if (gPrefBranch.prefHasUserValue(prefName)) {
326 | pref.lockCol = PREF_IS_MODIFIED;
327 | }
328 |
329 | try {
330 | switch (gPrefBranch.getPrefType(prefName)) {
331 | case gPrefBranch.PREF_BOOL:
332 | pref.typeCol = gPrefBranch.PREF_BOOL;
333 | // convert to a string
334 | pref.valueCol = gPrefBranch.getBoolPref(prefName).toString();
335 | break;
336 | case gPrefBranch.PREF_INT:
337 | pref.typeCol = gPrefBranch.PREF_INT;
338 | // convert to a string
339 | pref.valueCol = gPrefBranch.getIntPref(prefName).toString();
340 | break;
341 | default:
342 | case gPrefBranch.PREF_STRING:
343 | pref.valueCol = gPrefBranch.getStringPref(prefName);
344 | // Try in case it's a localized string (will throw an exception if not)
345 | if (
346 | pref.lockCol == PREF_IS_DEFAULT_VALUE &&
347 | /^chrome:\/\/.+\/locale\/.+\.properties/.test(pref.valueCol)
348 | ) {
349 | pref.valueCol = gPrefBranch.getComplexValue(
350 | prefName,
351 | nsIPrefLocalizedString
352 | ).data;
353 | }
354 | break;
355 | }
356 | } catch (e) {
357 | // Also catch obscure cases in which you can't tell in advance
358 | // that the pref exists but has no user or default value...
359 | }
360 | }
361 |
362 | async function onConfigLoad() {
363 | let configContext = document.getElementById("configContext");
364 | configContext.addEventListener("popupshowing", function(event) {
365 | if (event.target == this) {
366 | updateContextMenu();
367 | }
368 | });
369 |
370 | let commandListeners = {
371 | toggleSelected: ModifySelected,
372 | modifySelected: ModifySelected,
373 | copyPref,
374 | copyName,
375 | copyValue,
376 | resetSelected: ResetSelected,
377 | };
378 |
379 | configContext.addEventListener("command", e => {
380 | if (e.target.id in commandListeners) {
381 | commandListeners[e.target.id]();
382 | }
383 | });
384 |
385 | let configString = document.getElementById("configString");
386 | configString.addEventListener("command", function() {
387 | NewPref(nsIPrefBranch.PREF_STRING);
388 | });
389 |
390 | let configInt = document.getElementById("configInt");
391 | configInt.addEventListener("command", function() {
392 | NewPref(nsIPrefBranch.PREF_INT);
393 | });
394 |
395 | let configBool = document.getElementById("configBool");
396 | configBool.addEventListener("command", function() {
397 | NewPref(nsIPrefBranch.PREF_BOOL);
398 | });
399 |
400 | let keyVKReturn = document.getElementById("keyVKReturn");
401 | keyVKReturn.addEventListener("command", ModifySelected);
402 |
403 | let textBox = document.getElementById("textbox");
404 | textBox.addEventListener("command", FilterPrefs);
405 |
406 | let configFocuSearch = document.getElementById("configFocuSearch");
407 | configFocuSearch.addEventListener("command", function() {
408 | textBox.focus();
409 | });
410 |
411 | let configFocuSearch2 = document.getElementById("configFocuSearch2");
412 | configFocuSearch2.addEventListener("command", function() {
413 | textBox.focus();
414 | });
415 |
416 | let warningButton = document.getElementById("warningButton");
417 | warningButton.addEventListener("command", ShowPrefs);
418 |
419 | let configTree = document.getElementById("configTree");
420 | configTree.addEventListener("select", function() {
421 | window.updateCommands("select");
422 | });
423 |
424 | let configTreeBody = document.getElementById("configTreeBody");
425 | configTreeBody.addEventListener("dblclick", function(event) {
426 | if (event.button == 0) {
427 | ModifySelected();
428 | }
429 | });
430 |
431 | gLockStrs[PREF_IS_DEFAULT_VALUE] = 'default';
432 | gLockStrs[PREF_IS_MODIFIED] = 'modified';
433 | gLockStrs[PREF_IS_LOCKED] = 'locked';
434 | gTypeStrs[nsIPrefBranch.PREF_STRING] = 'string';
435 | gTypeStrs[nsIPrefBranch.PREF_INT] = 'integer';
436 | gTypeStrs[nsIPrefBranch.PREF_BOOL] = 'boolean';
437 |
438 | var showWarning = gPrefBranch.getBoolPref("general.warnOnAboutConfig");
439 |
440 | if (showWarning) {
441 | document.getElementById("warningButton").focus();
442 | } else {
443 | ShowPrefs();
444 | }
445 | }
446 |
447 | // Unhide the warning message
448 | function ShowPrefs() {
449 | gPrefBranch.getChildList("").forEach(fetchPref);
450 |
451 | var descending = document.getElementsByAttribute(
452 | "sortDirection",
453 | "descending"
454 | );
455 | if (descending.item(0)) {
456 | gSortedColumn = descending[0].id;
457 | gSortDirection = -1;
458 | } else {
459 | var ascending = document.getElementsByAttribute(
460 | "sortDirection",
461 | "ascending"
462 | );
463 | if (ascending.item(0)) {
464 | gSortedColumn = ascending[0].id;
465 | } else {
466 | document
467 | .getElementById(gSortedColumn)
468 | .setAttribute("sortDirection", "ascending");
469 | }
470 | }
471 | gSortFunction = gSortFunctions[gSortedColumn];
472 | gPrefArray.sort(gSortFunction);
473 |
474 | gPrefBranch.addObserver("", gPrefListener);
475 |
476 | var configTree = document.getElementById("configTree");
477 | configTree.view = view;
478 | configTree.controllers.insertControllerAt(0, configController);
479 |
480 | document.getElementById("configDeck").setAttribute("selectedIndex", 1);
481 | document.getElementById("configTreeKeyset").removeAttribute("disabled");
482 | if (!document.getElementById("showWarningNextTime").checked) {
483 | gPrefBranch.setBoolPref("general.warnOnAboutConfig", false);
484 | }
485 |
486 | // Process about:config?filter=
487 | var textbox = document.getElementById("textbox");
488 | // About URIs don't support query params, so do this manually
489 | var loc = document.location.href;
490 | var matches = /[?&]filter\=([^&]+)/i.exec(loc);
491 | if (matches) {
492 | textbox.value = decodeURIComponent(matches[1]);
493 | }
494 |
495 | // Even if we did not set the filter string via the URL query,
496 | // textbox might have been set via some other mechanism
497 | if (textbox.value) {
498 | FilterPrefs();
499 | }
500 | textbox.focus();
501 | }
502 |
503 | function onConfigUnload() {
504 | if (
505 | document.getElementById("configDeck").getAttribute("selectedIndex") == 1
506 | ) {
507 | gPrefBranch.removeObserver("", gPrefListener);
508 | var configTree = document.getElementById("configTree");
509 | configTree.view = null;
510 | configTree.controllers.removeController(configController);
511 | }
512 | }
513 |
514 | function FilterPrefs() {
515 | if (
516 | document.getElementById("configDeck").getAttribute("selectedIndex") != 1
517 | ) {
518 | return;
519 | }
520 |
521 | var substring = document.getElementById("textbox").value;
522 | // Check for "/regex/[i]"
523 | if (substring.charAt(0) == "/") {
524 | var r = substring.match(/^\/(.*)\/(i?)$/);
525 | try {
526 | gFilter = RegExp(r[1], r[2]);
527 | } catch (e) {
528 | return; // Do nothing on incomplete or bad RegExp
529 | }
530 | } else if (substring) {
531 | gFilter = RegExp(
532 | substring
533 | .replace(/([^* \w])/g, "\\$1")
534 | .replace(/^\*+/, "")
535 | .replace(/\*+/g, ".*"),
536 | "i"
537 | );
538 | } else {
539 | gFilter = null;
540 | }
541 |
542 | var prefCol =
543 | view.selection && view.selection.currentIndex < 0
544 | ? null
545 | : gPrefView[view.selection.currentIndex].prefCol;
546 | var oldlen = gPrefView.length;
547 | gPrefView = gPrefArray;
548 | if (gFilter) {
549 | gPrefView = [];
550 | for (var i = 0; i < gPrefArray.length; ++i) {
551 | if (gFilter.test(gPrefArray[i].prefCol + ";" + gPrefArray[i].valueCol)) {
552 | gPrefView.push(gPrefArray[i]);
553 | }
554 | }
555 | }
556 | view.treebox.invalidate();
557 | view.treebox.rowCountChanged(oldlen, gPrefView.length - oldlen);
558 | gotoPref(prefCol);
559 | }
560 |
561 | function prefColSortFunction(x, y) {
562 | if (x.prefCol > y.prefCol) {
563 | return gSortDirection;
564 | }
565 | if (x.prefCol < y.prefCol) {
566 | return -gSortDirection;
567 | }
568 | return 0;
569 | }
570 |
571 | function lockColSortFunction(x, y) {
572 | if (x.lockCol != y.lockCol) {
573 | return gSortDirection * (y.lockCol - x.lockCol);
574 | }
575 | return prefColSortFunction(x, y);
576 | }
577 |
578 | function typeColSortFunction(x, y) {
579 | if (x.typeCol != y.typeCol) {
580 | return gSortDirection * (y.typeCol - x.typeCol);
581 | }
582 | return prefColSortFunction(x, y);
583 | }
584 |
585 | function valueColSortFunction(x, y) {
586 | if (x.valueCol > y.valueCol) {
587 | return gSortDirection;
588 | }
589 | if (x.valueCol < y.valueCol) {
590 | return -gSortDirection;
591 | }
592 | return prefColSortFunction(x, y);
593 | }
594 |
595 | const gSortFunctions = {
596 | prefCol: prefColSortFunction,
597 | lockCol: lockColSortFunction,
598 | typeCol: typeColSortFunction,
599 | valueCol: valueColSortFunction,
600 | };
601 |
602 | const gCategoryLabelForSortColumn = {
603 | prefCol: "SortByName",
604 | lockCol: "SortByStatus",
605 | typeCol: "SortByType",
606 | valueCol: "SortByValue",
607 | };
608 |
609 | const configController = {
610 | supportsCommand: function supportsCommand(command) {
611 | return command == "cmd_copy";
612 | },
613 | isCommandEnabled: function isCommandEnabled(command) {
614 | return view.selection && view.selection.currentIndex >= 0;
615 | },
616 | doCommand: function doCommand(command) {
617 | copyPref();
618 | },
619 | onEvent: function onEvent(event) {},
620 | };
621 |
622 | function updateContextMenu() {
623 | var lockCol = PREF_IS_LOCKED;
624 | var typeCol = nsIPrefBranch.PREF_STRING;
625 | var valueCol = "";
626 | var copyDisabled = true;
627 | var prefSelected = view.selection.currentIndex >= 0;
628 |
629 | if (prefSelected) {
630 | var prefRow = gPrefView[view.selection.currentIndex];
631 | lockCol = prefRow.lockCol;
632 | typeCol = prefRow.typeCol;
633 | valueCol = prefRow.valueCol;
634 | copyDisabled = false;
635 | }
636 |
637 | var copyPref = document.getElementById("copyPref");
638 | copyPref.setAttribute("disabled", copyDisabled);
639 |
640 | var copyName = document.getElementById("copyName");
641 | copyName.setAttribute("disabled", copyDisabled);
642 |
643 | var copyValue = document.getElementById("copyValue");
644 | copyValue.setAttribute("disabled", copyDisabled);
645 |
646 | var resetSelected = document.getElementById("resetSelected");
647 | resetSelected.setAttribute("disabled", lockCol != PREF_IS_MODIFIED);
648 |
649 | var canToggle = typeCol == nsIPrefBranch.PREF_BOOL && valueCol != "";
650 | // indicates that a pref is locked or no pref is selected at all
651 | var isLocked = lockCol == PREF_IS_LOCKED;
652 |
653 | var modifySelected = document.getElementById("modifySelected");
654 | modifySelected.setAttribute("disabled", isLocked);
655 | modifySelected.hidden = canToggle;
656 |
657 | var toggleSelected = document.getElementById("toggleSelected");
658 | toggleSelected.setAttribute("disabled", isLocked);
659 | toggleSelected.hidden = !canToggle;
660 | }
661 |
662 | function copyPref() {
663 | var pref = gPrefView[view.selection.currentIndex];
664 | gClipboardHelper.copyString(pref.prefCol + ";" + pref.valueCol);
665 | }
666 |
667 | function copyName() {
668 | gClipboardHelper.copyString(gPrefView[view.selection.currentIndex].prefCol);
669 | }
670 |
671 | function copyValue() {
672 | gClipboardHelper.copyString(gPrefView[view.selection.currentIndex].valueCol);
673 | }
674 |
675 | function ModifySelected() {
676 | if (view.selection.currentIndex >= 0) {
677 | ModifyPref(gPrefView[view.selection.currentIndex]);
678 | }
679 | }
680 |
681 | function ResetSelected() {
682 | var entry = gPrefView[view.selection.currentIndex];
683 | gPrefBranch.clearUserPref(entry.prefCol);
684 | }
685 |
686 | async function NewPref(type) {
687 | var result = { value: "" };
688 | var dummy = { value: 0 };
689 |
690 | let [newTitle, newPrompt] = [`New ${gTypeStrs[type]} value`, 'Enter the preference name'];
691 |
692 | if (
693 | Services.prompt.prompt(window, newTitle, newPrompt, result, null, dummy)
694 | ) {
695 | result.value = result.value.trim();
696 | if (!result.value) {
697 | return;
698 | }
699 |
700 | var pref;
701 | if (result.value in gPrefHash) {
702 | pref = gPrefHash[result.value];
703 | } else {
704 | pref = {
705 | prefCol: result.value,
706 | lockCol: PREF_IS_DEFAULT_VALUE,
707 | typeCol: type,
708 | valueCol: "",
709 | };
710 | }
711 | if (ModifyPref(pref)) {
712 | setTimeout(gotoPref, 0, result.value);
713 | }
714 | }
715 | }
716 |
717 | function gotoPref(pref) {
718 | // make sure the pref exists and is displayed in the current view
719 | var index = pref in gPrefHash ? getViewIndexOfPref(gPrefHash[pref]) : -1;
720 | if (index >= 0) {
721 | view.selection.select(index);
722 | view.treebox.ensureRowIsVisible(index);
723 | } else {
724 | view.selection.clearSelection();
725 | view.selection.currentIndex = -1;
726 | }
727 | }
728 |
729 | async function ModifyPref(entry) {
730 | if (entry.lockCol == PREF_IS_LOCKED) {
731 | return false;
732 | }
733 |
734 | let [title] = [`Enter ${gTypeStrs[entry.typeCol]} value`];
735 |
736 | if (entry.typeCol == nsIPrefBranch.PREF_BOOL) {
737 | var check = { value: entry.valueCol == "false" };
738 | if (
739 | !entry.valueCol &&
740 | !Services.prompt.select(
741 | window,
742 | title,
743 | entry.prefCol,
744 | [false, true],
745 | check
746 | )
747 | ) {
748 | return false;
749 | }
750 | gPrefBranch.setBoolPref(entry.prefCol, check.value);
751 | } else {
752 | var result = { value: entry.valueCol };
753 | var dummy = { value: 0 };
754 | if (
755 | !Services.prompt.prompt(window, title, entry.prefCol, result, null, dummy)
756 | ) {
757 | return false;
758 | }
759 | if (entry.typeCol == nsIPrefBranch.PREF_INT) {
760 | // | 0 converts to integer or 0; - 0 to float or NaN.
761 | // Thus, this check should catch all cases.
762 | var val = result.value | 0;
763 | if (val != result.value - 0) {
764 | const [err_title, err_text] = ['Invalid value', 'The text you entered is not a number.'];
765 |
766 | Services.prompt.alert(window, err_title, err_text);
767 | return false;
768 | }
769 | gPrefBranch.setIntPref(entry.prefCol, val);
770 | } else {
771 | gPrefBranch.setStringPref(entry.prefCol, result.value);
772 | }
773 | }
774 |
775 | Services.prefs.savePrefFile(null);
776 | return true;
777 | }
778 |
779 | window.onload = onConfigLoad;
780 | window.onunload = onConfigUnload;
--------------------------------------------------------------------------------
/chrome/utils/sidebarModoki/closed.svg:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chrome/utils/sidebarModoki/opened.svg:
--------------------------------------------------------------------------------
1 |
4 |
6 |
10 |
11 |
--------------------------------------------------------------------------------