├── LICENSE ├── javascript ├── firefox-extensions-list-with-amo-links.js ├── firefox-extensions-list-with-last-updated-order.js ├── firefox-toggle-add-ons-from-console.js ├── firefox-v109-change-order-under-extensions-button.js └── firefox-list-enable-disable-add-ons-from-console.md ├── userscript ├── reddit_-_unblock_-_create_cookie_and_reload.user.js └── all_-_copy_link_on_click.user.js ├── firefox-style ├── chrome_debugger_profile │ ├── user.js │ └── chrome │ │ └── userContent.css └── chrome │ ├── userContent.css │ └── userChrome.css ├── links-elsewhere.md ├── firefox-info ├── command-line-options.md ├── profile-in-a-folder-or-encrypted.md └── preferences-group-view.md ├── links-elsewhere-android.md └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021-onwards icpantsparti/icpantsparti2 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /javascript/firefox-extensions-list-with-amo-links.js: -------------------------------------------------------------------------------- 1 | // Name : firefox-extensions-list-with-amo-links.js 2 | // Project : https://github.com/icpantsparti2/browser-bits 3 | // Version : 2023.04.13 4 | // File/Update : https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/javascript/firefox-extensions-list-with-amo-links.js 5 | // License (MIT): https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/LICENSE 6 | // 7 | // You can see a list of your add-ons by going to 'about:support#addons'. 8 | // However, this code lists your extensions without showing dictionary and 9 | // builtin add-ons. Shows: name, status, version, addons.mozilla.org link. 10 | // 11 | // To run: 12 | // (1) select and copy the code below 13 | // (2) open the 'about:addons' page (Ctrl+Shift+A) 14 | // (3) open the Web Console (Ctrl+Shift+K or F12/Console) 15 | // (4) paste the code into the input box 16 | // (5) press Ctrl+ to execute the code 17 | // (6) if you need to copy/paste the result use right click and "Copy Object" 18 | 19 | javascript:AddonManager.getAddonsByTypes(["extension"]).then(addons=>{var list=`/* (${new Date().toJSON()}) Firefox Extensions List */\n`;addons.sort((a,b)=>{return a.name.localeCompare(b.name)}).forEach(addon=>{if(!(addon.isBuiltin||addon.isSystem)){list+=`${addon.name}\t${addon.isActive}\t${addon.version}\thttps://addons.mozilla.org/firefox/addon/${encodeURI(addon.id)}\n`};});console.log(list);}); 20 | -------------------------------------------------------------------------------- /userscript/reddit_-_unblock_-_create_cookie_and_reload.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name reddit - unblock (create cookie and reload) 3 | // @namespace Violentmonkey Scripts 4 | // @match *://*.reddit.com/* 5 | // @grant none 6 | // @version 2024.01.08 7 | // @noframes 8 | // @license MIT License 9 | // @description for "Blocked" "whoa there, pardner!" cowboy bs 10 | // ==/UserScript== 11 | 12 | /* 13 | NOTES 14 | 15 | File/Update : https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/userscript/reddit_-_unblock_-_create_cookie_and_reload.user.js 16 | License (MIT): https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/LICENSE 17 | 18 | thanks: https://www.reddit.com/r/mullvadvpn/comments/18jbxb2 19 | 20 | if using "Private Browsing" make sure the extension (Violentmonkey/etc) has: 21 | "Allow" set for "Run in Private Windows" 22 | 23 | Alternatively: add a filter in uBlock Origin/AdGuard: 24 | reddit.com#%#//scriptlet('set-cookie-reload', 'reddit_session', '0') 25 | 26 | Alternatively: click a bookmarklet, add a bookmark with URL containing: 27 | javascript:(function(){document.cookie="reddit_session=;Domain=.reddit.com;Path=/;Expires=;Secure=true;SameSite=None";})(); 28 | */ 29 | 30 | if (document.title === "Blocked") { 31 | document.cookie="reddit_session=;Domain=.reddit.com;Path=/;Expires=;Secure=true;SameSite=None"; 32 | window.location.reload(); 33 | } 34 | -------------------------------------------------------------------------------- /firefox-style/chrome_debugger_profile/user.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | /* [FIREFOX-PROFILE-FOLDER]/chrome_debugger_profile/user.js 3 | /*------------------------------------------------------------------------------ 4 | /* File/Update : https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/firefox-style/chrome_debugger_profile/user.js 5 | /* Version : 2023.10.23 6 | /* License (MIT): https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/LICENSE 7 | /* Project : https://github.com/icpantsparti2/browser-bits 8 | /* Disclaimer : Use with care at your own risk 9 | /******************************************************************************/ 10 | //user_pref("devtools.editor.autoclosebrackets", false); 11 | //user_pref("devtools.inspector.showUserAgentStyles", true); 12 | user_pref("devtools.selfxss.count", 5); 13 | user_pref("devtools.styleeditor.showAtRulesSidebar", false); 14 | //user_pref("devtools.theme", "dark"); 15 | //user_pref("devtools.webconsole.groupWarningMessages", false); 16 | //user_pref("devtools.webconsole.input.autocomplete", false); 17 | //user_pref("devtools.webconsole.input.eagerEvaluation", false); 18 | //user_pref("devtools.webconsole.input.editor", true); 19 | user_pref("devtools.webconsole.input.editorOnboarding", false); 20 | //user_pref("devtools.webconsole.input.editorWidth", 200); 21 | user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); 22 | -------------------------------------------------------------------------------- /javascript/firefox-extensions-list-with-last-updated-order.js: -------------------------------------------------------------------------------- 1 | // Name : firefox-extensions-list-with-last-updated-order.js 2 | // Project : https://github.com/icpantsparti2/browser-bits 3 | // Version : 2023.04.13 4 | // File/Update : https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/javascript/firefox-extensions-list-with-last-updated-order.js 5 | // License (MIT): https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/LICENSE 6 | // 7 | // This code lists when your extensions were "Last Updated" on your Firefox 8 | // (the same date shown when you click on an extension under 'about:addons') 9 | // 10 | // To run: 11 | // (1) select and copy the code below 12 | // (2) open the 'about:addons' page (Ctrl+Shift+A) 13 | // (3) open the Web Console (Ctrl+Shift+K or F12/Console) 14 | // (4) paste the code into the input box 15 | // (5) press Ctrl+ to execute the code 16 | // (6) if you need to copy/paste the result use right click and "Copy Object" 17 | 18 | javascript:AddonManager.getAddonsByTypes(["extension"]).then(addons=>{var list=`/* (${new Date().toJSON()}) Firefox Extensions List with Last Updated Order */\n`;addons.sort((a,b)=>{return a.updateDate-b.updateDate}).forEach(addon=>{if(!(addon.isBuiltin||addon.isSystem)){list+=`${addon.updateDate?addon.updateDate.toJSON():""}\t${addon.name}\t${addon.isActive}\t${addon.version}\thttps://addons.mozilla.org/firefox/addon/${encodeURI(addon.id)}\n`};});console.log(list);}); 19 | -------------------------------------------------------------------------------- /links-elsewhere.md: -------------------------------------------------------------------------------- 1 | #### Links to other places 2 | 3 | | Link | Note | 4 | | :--------------------------- | :-------------------------------------------------------- | 5 | | [Firefox Browser](https://www.mozilla.org/firefox/all/) (mozilla.org)
\[[Add-ons/Extensions/Themes](https://addons.mozilla.org/)\] | Choose download: Browser/Platform/Language
(eg Release/Beta/Developer Edition/Nightly/ESR/Android/iOS etc) | 6 | | [arkenfox user.js](https://github.com/arkenfox/user.js) (github.com)
\[[issues](https://github.com/arkenfox/user.js/issues?q=sort%3Aupdated-desc)\] \[[wiki](https://github.com/arkenfox/user.js/wiki)\] | Firefox privacy, security and anti-fingerprinting:
a comprehensive user.js template for configuration and hardening | 7 | | [Reddit: Firefox](https://old.reddit.com/r/firefox/new) | | 8 | | [fedia.io: firefox](https://fedia.io/m/firefox/newest) | | 9 | | [Reddit: FirefoxCSS](https://old.reddit.com/r/FirefoxCSS/new) | Modify the look of your Firefox (userChrome.css/userContent.css) | 10 | | [fedia.io: FirefoxCSS](https://fedia.io/m/FirefoxCSS/newest) | | 11 | | [Thunderbird Email Client](https://www.thunderbird.net/thunderbird/all/) (thunderbird.net)
\[[Add-ons](https://addons.thunderbird.net/)\] | Choose download: Language/Operating System | 12 | | [Brave Browser](https://github.com/brave/brave-browser) (github.com)
\[[Extensions](https://chrome.google.com/webstore/category/extensions) (google.com)\] | Possible secondary browser (Chromium based)
(Get extensions from the Google Chrome Webstore) | 13 | | [Reddit: brave_browser](https://old.reddit.com/r/brave_browser/) | | 14 | -------------------------------------------------------------------------------- /firefox-info/command-line-options.md: -------------------------------------------------------------------------------- 1 | ### Notes: viewing Firefox command line options/switches 2 | 3 | * ###### | 2021.09.09 (first 2021.08.22) | https://github.com/icpantsparti/browser-bits/blob/main/firefox-info/command-line-options.md | License (MIT): https://raw.githubusercontent.com/icpantsparti/browser-bits/main/LICENSE | Disclaimer: Use with care at your own risk, and verify any results | 4 | 5 | --- 6 | 7 | #### Windows 8 | 9 | From command prompt (cmd.exe), for some reason it does not show unless piped or redirected: 10 | 11 | * Output by page 12 | 13 | ``` 14 | "C:\Program Files\Mozilla Firefox\firefox.exe" -h | more 15 | ``` 16 | 17 | (press 'Enter' key to read the next page) 18 | 19 | * Output all 20 | 21 | ``` 22 | "C:\Program Files\Mozilla Firefox\firefox.exe" -h | findstr /N /I /R ".*" 23 | ``` 24 | 25 | (findstr: /N show line numbers, /I ignore case, /R regex, ".*" search term) 26 | 27 | * Output to a file, then output the file 28 | 29 | ``` 30 | "C:\Program Files\Mozilla Firefox\firefox.exe" -h >> firefox-help.txt 31 | type firefox-help.txt 32 | ``` 33 | 34 | --- 35 | 36 | #### Linux 37 | 38 | From a terminal command line: 39 | 40 | * Output all 41 | 42 | ``` 43 | firefox -h 44 | ``` 45 | 46 | * Output by page 47 | 48 | ``` 49 | firefox -h | more 50 | ``` 51 | 52 | (press: 'Space' key to read the next page, 'Enter' key to read line by line) 53 | 54 | * Output and view 55 | 56 | ``` 57 | firefox -h | less -NJIS 58 | ``` 59 | 60 | (less: -N show line numbers, -J show status column, -I search ignores case, -S no wrap) 61 | 62 | * Output to a file, then output the file 63 | 64 | ``` 65 | firefox -h >> firefox-help.txt ; cat firefox-help.txt 66 | ``` 67 | 68 | --- 69 | -------------------------------------------------------------------------------- /links-elsewhere-android.md: -------------------------------------------------------------------------------- 1 | #### Links to other places (Android) 2 | 3 | **Care: third party builds/forks _might_ cause issues (eg: _might_ lag behind parent releases, or their modifications _might_ cause vulnerabilities)** 4 | 5 | | Name | Link(s) | Note | 6 | | :-- | :-- | :-- | 7 | | Firefox Nightly | [Google Play](https://play.google.com/store/apps/details?id=org.mozilla.fenix) | with about:config enabled
    (eg you can enable privacy.resistFingerprinting, privacy.firstparty.isolate)
allows "Custom Add-on collection" in settings (try extra add-ons)
    (under "About..." tap firefox icon 5 times) | 8 | | Fennec F-Droid browser | [F-Droid](https://f-droid.org/en/packages/org.mozilla.fennec_fdroid/) | alternative third party Firefox build
with about:config enabled, and allows custom add-ons, minus some proprietary bits
(use [f-droid](https://f-droid.org/) to manage updates) | 9 | | Mull browser | [F-Droid](https://f-droid.org/en/packages/us.spotco.fennec_dos/) | alternative third party Firefox build
with some about:config values modified, and allows custom add-ons, etc
(use [f-droid](https://f-droid.org/) to manage updates) | 10 | 11 | Possible secondary browsers 12 | 13 | | Name | Link(s) | Note | 14 | | :-- | :-- | :-- | 15 | | Brave browser | [Google Play](https://play.google.com/store/apps/details?id=com.brave.browser) | possible secondary browser (chromium based) | 16 | | Bromite browser | [F-Droid](https://www.bromite.org/fdroid)
[GitHub](https://github.com/bromite/bromite) | possible secondary browser (chromium based)
(use [f-droid](https://f-droid.org/) to manage updates) | 17 | | Kiwi browser | [Google Play](https://play.google.com/store/apps/details?id=com.kiwibrowser.browser)
[GitHub](https://github.com/kiwibrowser/src.next) | possible secondary browser (chromium based)
(allows some extensions)
(GitHub might have newest versions) | 18 | -------------------------------------------------------------------------------- /firefox-style/chrome_debugger_profile/chrome/userContent.css: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | /* [FIREFOX-PROFILE-FOLDER]/chrome_debugger_profile/chrome/userContent.css 3 | /*------------------------------------------------------------------------------ 4 | /* File/Update : https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/firefox-style/chrome_debugger_profile/chrome/userContent.css 5 | /* Version : 2022.10.05 6 | /* License (MIT): https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/LICENSE 7 | /* Project : https://github.com/icpantsparti2/browser-bits 8 | /* Disclaimer : Use with care at your own risk 9 | /*------------------------------------------------------------------------------ 10 | /* Summary : userContent.css file for debugger profile 11 | /*------------------------------------------------------------------------------ 12 | /* Acknowledgments: thanks to the links shown for useful info 13 | /******************************************************************************/ 14 | 15 | 16 | 17 | 18 | /******************************************************************************* 19 | /* ### highlight certain file names under [Browser Toolbox] [Style Editor] 20 | /*------------------------------------------------------------------------------ 21 | /* highlight file names "userChrome.css" and "userContent.css" when using: 22 | /* [Browser Toolbox] (Ctrl+Shift+Alt+I) [Developer Tools] [Style Editor] 23 | /* NOTE: this CSS rule must be set in the folder/file below: 24 | /* [FIREFOX-PROFILE-FOLDER]/chrome_debugger_profile/chrome/userContent.css 25 | /* NOTE: you must also create the file below (containing the user_pref): 26 | /* [FIREFOX-PROFILE-FOLDER]/chrome_debugger_profile/user.js 27 | /* user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); 28 | /* https://twitter.com/myfonj/status/1387584962354982912 29 | /* https://www.reddit.com/r/FirefoxCSS/comments/73dvty/tutorial_how_to_create_and_livedebug_userchromecss/ 30 | /* https://www.reddit.com/r/FirefoxCSS/comments/n91i3w/quick_way_to_find_userchromecss_in_developer_tools/ 31 | /******************************************************************************/ 32 | /**/ 33 | @-moz-document url-prefix("chrome://devtools/content/styleeditor/index.xhtml") { 34 | .splitview-nav label[value*="userChrome"] 35 | ,.splitview-nav label[value*="userContent"] { 36 | background-color: color-mix(in srgb, White 40%, AccentColor) !important; 37 | color: color-mix(in srgb, Black 40%, AccentColor) !important; 38 | font-weight: bold !important; 39 | } 40 | } 41 | /**/ 42 | 43 | 44 | 45 | 46 | /******************************************************************************/ 47 | 48 | -------------------------------------------------------------------------------- /firefox-info/profile-in-a-folder-or-encrypted.md: -------------------------------------------------------------------------------- 1 | ### Notes: run a Firefox profile located in its own folder (or encrypted folder) 2 | 3 | * ###### | 2021.09.09 (first 2021.08.31) | https://github.com/icpantsparti/browser-bits/blob/main/firefox-info/profile-in-a-folder-or-encrypted.md | License (MIT): https://raw.githubusercontent.com/icpantsparti/browser-bits/main/LICENSE | Disclaimer: Use with care at your own risk, and verify any results | 4 | 5 | Firefox profiles are usually stored in your user home folder, look at `about:support` or `about:profiles` to see where. 6 | 7 | It is possible to use either a Portable Firefox or a command line option to run firefox from another folder location. 8 | 9 | --- 10 | 11 | #### (Optional) Make an encrypted file container 12 | 13 | If you are not using system encryption (which VeraCrypt can do on Windows). 14 | 15 | With VeraCrypt: https://www.veracrypt.fr 16 | 17 | * You can use the "Create Volume" button, then "Create an encrypted **file container**". 18 | * Put the container file in a sensible location where you will not accidentally delete it 19 | * Give the container file an ".hc" extension (then clicking that file opens it with VeraCrypt) 20 | * The tricky part is choosing the container size (perhaps 4GB ?) and NTFS on Windows or eg EXT4 on Linux
21 | you can always move the folders/files to a new larger container if you ever need to. 22 | 23 | --- 24 | 25 | #### Windows Option 1 - Use a Portable Firefox (easier) 26 | 27 | Use portable Firefox: https://portableapps.com/apps/internet/firefox_portable 28 | 29 | * On the download site, below the download button, choose the installer for your language. 30 | * When the installer runs choose where to install
31 | (ie to the drive/path of your folder or mounted encrypted container)
32 | default folder name is "FirefoxPortable" or change that to your own choice 33 | * This gives you an entirely separate Firefox program in your specified location, with profile and cache folders. 34 | * It seems to cope when you change the folder location or name
35 | (so no issues if you mount an encrypted container with a different drive/path) 36 | * **However**, you will have to remember to check for updates. 37 | * See https://portableapps.com/support/firefox_portable
38 | for info about copying an existing profile, updating, using extra profiles, and more 39 | * Also see `FirefoxPortable/Other/Source/Readme.txt` file for various info about usage
40 | (and an example "FirefoxPortable.ini" file, which you place in the same folder as
41 | "FirefoxPortable.exe", for settings eg paths, parameters, splash, multiple instances)
42 | 43 | #### Windows Option 2 - Use the Firefox installed on your PC 44 | 45 | * Copy the "Firefox" icon from the desktop into your folder or mounted encrypted container. 46 | * Right click that "Firefox" file, select "Properties"
47 | clear the path shown for "Start in"
48 | change "Target" to something like: `"C:\Program Files\Mozilla Firefox\firefox.exe" -no-remote -profile MYFIREFOXPROFILENAME` 49 | * When you click on that "Firefox" icon it will create the folder, and the browser cache is stored there too.
50 | (or it will use an already created/copied profile, but note below) 51 | * **However**, if you rename the profile folder, or you copied/moved a profile
52 | you will have to edit the paths in the `extensions.json` file within that profile
53 | Eg you would have to change any "C:\\\\OLDPATH\\\\OLDFOLDER" to "K:\\\\NEWFOLDER" and any "C:/OLDPATH/OLDFOLDER" to "K:/NEWFOLDER".
54 | (so when using an encrypted container it is easier to mount with the same drive/path) 55 | 56 | --- 57 | 58 | #### Linux Option 1 - Use a Firefox application from custom location 59 | 60 | (rough example) 61 | 62 | * Download Firefox for Linux: https://www.mozilla.org/firefox/all/ 63 | * Extract the `firefox-XX.X.X.tar.bz2` file to your folder of choice
64 | eg `/opt/firefox-XX.X.X` or `/usr/local/bin/firefox-XX.X.X`
65 | or somewhere under your home folder (may be `/home/USER/.local/usr/bin/firefox-XX.X.X` ??)
66 | or in an encrypted container `/media/veracrypt1/firefox-XX.X.X` 67 | * To run Firefox, either: 68 | * run from the command line
69 | eg `/PATH/firefox-XX.X.X/firefox --no-remote --profile /PATH/MYFIREFOXPROFILENAME` 70 | * run with a .desktop file
71 | eg copy the `/usr/share/applications/firefox.desktop` to `/home/USER/.local/share/applications/firefox-XX.XX.X.desktop`
72 | edit the file and set the `name=firefox-XX.X.X (profile: /PATH/MYFIREFOXPROFILENAME)`
73 | and `exec=/PATH/firefox-XX.X.X/firefox --no-remote --profile /PATH/MYFIREFOXPROFILENAME` 74 | * if the profile path ever changes you will have to edit the `extensions.json` file in the profile folder 75 | 76 | #### Linux Option 2 - Use the Firefox installed 77 | 78 | (rough example) 79 | 80 | * To run Firefox, either: 81 | * run from the command line
82 | eg `firefox --no-remote --profile /PATH/MYFIREFOXPROFILENAME` 83 | * run with a .desktop file
84 | eg copy the `/usr/share/applications/firefox.desktop` to `/home/USER/.local/share/applications/firefox-XX.XX.X.desktop`
85 | edit the file and set the `name=firefox (profile: /PATH/MYFIREFOXPROFILENAME)`
86 | and `exec=firefox --no-remote --profile /PATH/MYFIREFOXPROFILENAME` 87 | * If the profile path ever changes you will have to edit the `extensions.json` file in the profile folder 88 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### Browser Bits (https://github.com/icpantsparti2/browser-bits) 2 | 3 | * ###### | 2023.04.13 (first 2021.08.09) | https://github.com/icpantsparti2/browser-bits/blob/main/README.md | License (MIT): https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/LICENSE | Disclaimer: Use with care at your own risk, and verify any results | 4 | 5 | #### Bits of code/config/info/links for web browsers (mainly Firefox) 6 | 7 | Listed below: [links-elsewhere](#links-elsewhere) | [firefox-style](#firefox-style) | [javascript](#javascript) | [firefox-info](#firefox-info) | [other](#other) 8 | 9 | * ###### Firefox is amazing (but not perfect), **but** do not let big companies take over the web, use Firefox as much as you can.  However, if a site does not work in Firefox (sometimes eg: video conference, bank, healthcare), first try an add-on that spoofs your user agent, then if you must use a secondary browser such as Ungoogled Chromium or Brave.  (Avoid the data collecting browsers such as Google/Chrome and Microsoft/Edge). 10 | 11 | #### links-elsewhere 12 | 13 | | Link | Note | 14 | | :--- | :--- | 15 | | [links-elsewhere.md](https://github.com/icpantsparti2/browser-bits/blob/main/links-elsewhere.md) | Links to other places (browsers, user.js, forums, etc) | 16 | | [links-elsewhere-android.md](https://github.com/icpantsparti2/browser-bits/blob/main/links-elsewhere-android.md) | Links to other places for Android (browsers, etc) | 17 | 18 | #### firefox-style 19 | 20 | | Link | Note | 21 | | :--- | :--- | 22 | | [chrome/**userChrome.css**](https://github.com/icpantsparti2/browser-bits/blob/main/firefox-style/chrome/userChrome.css)  \[[raw](https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/firefox-style/chrome/userChrome.css)\] | eg: tab style, tab min-size, numbered tabs, profile indicator, and more | 23 | | [chrome/**userContent.css**](https://github.com/icpantsparti2/browser-bits/blob/main/firefox-style/chrome/userContent.css)  \[[raw](https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/firefox-style/chrome/userContent.css)\] | eg to compact the layout (see more at once) on: about:profiles, about:addons, about:config, about:preferences | 24 | | [1] [chrome_debugger_profile/chrome/**userContent.css**](https://github.com/icpantsparti2/browser-bits/blob/main/firefox-style/chrome_debugger_profile/chrome/userContent.css)  \[[raw](https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/firefox-style/chrome_debugger_profile/chrome/userContent.css)\]
[2] [chrome_debugger_profile/**user.js**](https://github.com/icpantsparti2/browser-bits/blob/main/firefox-style/chrome_debugger_profile/user.js)  \[[raw](https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/firefox-style/chrome_debugger_profile/user.js)\] | highlight file names "userChrome.css" and "userContent.css" when using [Browser Toolbox] [Developer Tools] [Style Editor] | 25 | 26 | #### javascript 27 | 28 | | Link | Note | 29 | | :--- | :--- | 30 | | [firefox-extensions-list-with-amo-links.js](https://github.com/icpantsparti2/browser-bits/blob/main/javascript/firefox-extensions-list-with-amo-links.js)  \[[raw](https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/javascript/firefox-extensions-list-with-amo-links.js)\] | list your extensions in the 'about:addons' web console (with addons.mozilla.org links) | 31 | | [firefox-extensions-list-with-last-updated-order.js](https://github.com/icpantsparti2/browser-bits/blob/main/javascript/firefox-extensions-list-with-last-updated-order.js)  \[[raw](https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/javascript/firefox-extensions-list-with-last-updated-order.js)\] | list your extensions in the 'about:addons' web console (showing "Last Updated" date and order) | 32 | | [firefox-list-enable-disable-add-ons-from-console.md](https://github.com/icpantsparti2/browser-bits/blob/main/javascript/firefox-list-enable-disable-add-ons-from-console.md) | guide: list/toggle Firefox add-ons on/off using JavaScript in Web Console (based on below) | 33 | | [firefox-toggle-add-ons-from-console.js](https://github.com/icpantsparti2/browser-bits/blob/main/javascript/firefox-toggle-add-ons-from-console.js)  \[[raw](https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/javascript/firefox-toggle-add-ons-from-console.js)\] | 'prompt' popup for enable/disable add-ons from console with filter option (single/bulk eg disable all active, enable several in one go) | 34 | | [firefox-v109-change-order-under-extensions-button.js](https://github.com/icpantsparti2/browser-bits/blob/main/javascript/firefox-v109-change-order-under-extensions-button.js)  \[[raw](https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/javascript/firefox-v109-change-order-under-extensions-button.js)\] | run in 'about:addons' web console, for changing add-on order under extensions button (3 options, alphabetical/manual/drag'n'drop sort) | 35 | 36 | #### firefox-info 37 | 38 | | Link | Note | 39 | | :--- | :--- | 40 | | [command-line-options.md](https://github.com/icpantsparti2/browser-bits/blob/main/firefox-info/command-line-options.md) | Notes: viewing Firefox command line options/switches | 41 | | [preferences-group-view.md](https://github.com/icpantsparti2/browser-bits/blob/main/firefox-info/preferences-group-view.md) | Notes: view a group of preferences in Firefox about:config | 42 | | [profile-in-a-folder-or-encrypted.md](https://github.com/icpantsparti2/browser-bits/blob/main/firefox-info/profile-in-a-folder-or-encrypted.md) | Notes: run a Firefox profile located in its own folder (or encrypted folder) | 43 | 44 | #### other 45 | 46 | | Link | Note | 47 | | :--- | :--- | 48 | | project: [firefox-user.js-tool](https://github.com/icpantsparti2/firefox-user.js-tool)
open: [userjs-tool.html](https://icpantsparti2.github.io/firefox-user.js-tool/userjs-tool.html) | Interactive view, compare, and more for Firefox user.js (eg view arkenfox user.js in a table) | 49 | | [userjs-tool-aboutconfig-functions.js](https://github.com/icpantsparti2/firefox-user.js-tool/blob/master/userjs-tool-aboutconfig-functions.js)  \[[raw](https://raw.githubusercontent.com/icpantsparti2/firefox-user.js-tool/master/userjs-tool-aboutconfig-functions.js)\] | JavaScript functions for find/reset/set of user preferences and values in Firefox/Thunderbird about:config | 50 | -------------------------------------------------------------------------------- /firefox-info/preferences-group-view.md: -------------------------------------------------------------------------------- 1 | ### Notes: view a group of preferences in Firefox about:config 2 | 3 | * ###### | 2022.10.25 ([first 2021.04.16](https://github.com/icpantsparti/firefox-user.js-tool/issues/3)) | https://github.com/icpantsparti2/browser-bits/blob/main/firefox-info/preferences-group-view.md | License (MIT): https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/LICENSE | Disclaimer: Use with care at your own risk, and verify any results | 4 | 5 | Viewing groups of preferences is useful when reviewing, troubleshooting, or for toggles. 6 | 7 | In newer versions of Firefox, bookmarks of the style `about:config?filter=...` no longer populate the search box, 8 | they just open `about:config` now. However, we can style a `about:config?filter=...` bookmark that you 9 | can open and drag (or copy/paste) the link text into the `about:config` search box... 10 | 11 | --- 12 | 13 | #### Create about:config link/bookmark 14 | 15 | Form the link in this style (and optionally bookmark it): 16 | 17 | ``` 18 | about:config?filter=/^\*$|^(webgl\.disabled|media\.peerconnection\.enabled)(;|$)|^$/i 19 | ``` 20 | 21 | --- 22 | 23 | #### (Optional) Create the link from a list of preferences 24 | 25 | Optionally, paste your list of preferences into [Box 4 of userjs-tool.html](https://icpantsparti2.github.io/firefox-user.js-tool/userjs-tool.html?box=a), then click the `[To Group]` button to help create the link. 26 | 27 |
Note: userjs-tool.html is standard HTML/JavaScript that runs client sidethere is no uploading or external dependency/connection other than fetching text files (eg arkenfox user.js from GitHub) initiated by user action (or by specifying url parameters). It does not directly edit (or read) about:config or user.js, and web browser security ensures that the user controls the load/save of local files.
28 | 29 | --- 30 | 31 | #### Using the link/bookmark 32 | 33 | Just open the `about:config` page and paste (or drag) the link into the search box 34 | 35 | * Example 1 (open and drag): 36 | 37 | * **open** the `about:config` page
38 | ie: click on the `about:config...` bookmark 39 | 40 | * **drag** the [(Logo) Firefox]* into the `about:config` search box
41 | (*the "button" shown in front of the URL address box) 42 | 43 | * Example 2 (copy, open, paste): 44 | 45 | * **copy** the link
46 | ie: right click on the `about:config...` bookmark and choose Copy
47 | (tip: press and hold the right mouse button release on Copy) 48 | 49 | * **open** the `about:config` page
50 | ie: click on the `about:config...` bookmark
51 | or paste the link into the URL box 52 | 53 | * **paste** the link into the `about:config` search box
54 | (tip: press and hold the right mouse button release on Paste) 55 | 56 | * Example 3 (open, copy, paste): 57 | 58 | * **open** the `about:config` page
59 | ie: click on the `about:config...` bookmark 60 | 61 | * **copy** the link
62 | ie: right click in the URL box and Copy the link
63 | (tip: press and hold the right mouse button release on Copy) 64 | 65 | * **paste** the link into the `about:config` search box
66 | (tip: press and hold the right mouse button release on Paste) 67 | 68 | --- 69 | 70 | #### Examples 71 | 72 | These links generate groups of preferences (the text files specified are fetched): 73 | 74 | * [prefs from arkenfox troubleshooter.js](https://icpantsparti2.github.io/firefox-user.js-tool/userjs-tool.html?action=togroup&load4=%68ttps://raw.githubusercontent.com/arkenfox/user.js/master/scratchpad-scripts/troubleshooter.js) (fetches arkenfox troubleshooter.js file from GitHub) 75 | 76 | * eg bookmark named "about:config arkenfox troubleshooter v1.6.3 prefs plus others" containing link:
77 | (note: use the link above to get the latest list, below is v1.6.3 plus some extra prefs)
78 | ``` 79 | about:config?filter=/^\*$|^(=====FROM-ARKENFOX-TROUBLESHOOTER-V1.6.3-PLUS-OTHERS=====|accessibility\.force_disabled|privacy\.trackingprotection\.socialtracking\.enabled|privacy\.trackingprotection\.cryptomining\.enabled|privacy\.trackingprotection\.fingerprinting\.enabled|webgl\.disabled|javascript\.options\.ion|javascript\.options\.baselinejit|javascript\.options\.jit_trustedprincipals|=====START-OF-ARKENFOX-TROUBLESHOOTER-PREFS=====|media\.peerconnection\.enabled|network\.cookie\.cookieBehavior|network\.http\.referer\.XOriginPolicy|privacy\.firstparty\.isolate|privacy\.resistFingerprinting|security\.mixed_content\.block_display_content|svg\.disabled|browser\.cache\.offline\.enable|dom\.storage\.enabled|dom\.storageManager\.enabled|dom\.caches\.enabled|dom\.push\.connection\.enabled|dom\.push\.enabled|dom\.push\.serverURL|dom\.serviceWorkers\.enabled|dom\.webnotifications\.enabled|dom\.webnotifications\.serviceworker\.enabled|browser\.display\.use_document_fonts|font\.blacklist\.underline_offset|gfx\.font_rendering\.graphite\.enabled|gfx\.font_rendering\.opentype_svg\.enabled|layout\.css\.font-loading-api\.enabled|browser\.link\.open_newwindow\.restriction|canvas\.capturestream\.enabled|dom\.event\.clipboardevents\.enabled|dom\.event\.contextmenu\.enabled|dom\.IntersectionObserver\.enabled|dom\.popup_allowed_events|full-screen-api\.enabled|intl\.accept_languages|javascript\.options\.asmjs|javascript\.options\.wasm|permissions\.default\.shortcuts|dom\.vr\.enabled|media\.ondevicechange\.enabled|dom\.webaudio\.enabled|media\.autoplay\.default|media\.autoplay\.blocking_policy|browser\.formfill\.enable|signon\.autofillForms|signon\.formlessCapture\.enabled|security\.cert_pinning\.enforcement_level|security\.family_safety\.mode|security\.OCSP\.require|security\.pki\.sha1_enforcement_level|security\.ssl\.require_safe_negotiation|security\.ssl\.treat_unsafe_negotiation_as_broken|security\.ssl3\.dhe_rsa_aes_128_sha|security\.ssl3\.dhe_rsa_aes_256_sha|security\.ssl3\.ecdhe_ecdsa_aes_128_sha|security\.ssl3\.ecdhe_rsa_aes_128_sha|security\.ssl3\.rsa_aes_128_sha|security\.ssl3\.rsa_aes_256_sha|security\.ssl3\.rsa_des_ede3_sha|security\.tls\.enable_0rtt_data|security\.tls\.version\.max|security\.tls\.version\.min|plugin\.default\.state|plugin\.state\.flash|dom\.popup_maximum|geo\.provider\.network\.url|layout\.css\.visited_links_enabled|mathml\.disabled|network\.auth\.subresource-http-auth-allow|network\.http\.redirection-limit|network\.protocol-handler\.external\.ms-windows-store|privacy\.trackingprotection\.enabled|security\.data_uri\.block_toplevel_data_uri_navigations|privacy\.window\.name\.update\.enabled)(;|$)|^$/i 80 | ``` 81 | 82 | * [prefs from arkenfox user.js](https://icpantsparti2.github.io/firefox-user.js-tool/userjs-tool.html?at&groups=true) (fetches arkenfox user.js file from GitHub) 83 | 84 | * you would not bookmark these, you view them using the links shown, and you would enfore them using a [user.js (see arkenfox)](https://github.com/arkenfox/user.js) 85 | 86 | --- 87 | -------------------------------------------------------------------------------- /javascript/firefox-toggle-add-ons-from-console.js: -------------------------------------------------------------------------------- 1 | // JavaScript for Mozilla Firefox console 2 | // Firefox: Toggle Add-ons between enabled/disabled (single or bulk) (popup ui) 3 | // 4 | // Name : firefox-toggle-add-ons-from-console.js 5 | // Project : https://github.com/icpantsparti/browser-bits 6 | // Version : 2021.08.09 7 | // File/Update : https://raw.githubusercontent.com/icpantsparti/browser-bits/main/javascript/firefox-toggle-add-ons-from-console.js 8 | // License (MIT): https://raw.githubusercontent.com/icpantsparti/browser-bits/main/LICENSE 9 | // Disclaimer : Use with care at your own risk, and verify any results 10 | // 11 | // **** tip: use 'about:addons' and profiles with different add-ons set up **** 12 | // 13 | // This is only useful if you need another way to toggle add-ons on/off: 14 | // * eg: in bulk/single/interactive/javascript 15 | // * eg: https://old.reddit.com/r/firefox/comments/ozfd9u/are_there_any_js_files_that_can_enable_disabling/ 16 | // * shows a 'prompt' box popup and you can filter and bulk enable/disable add-ons 17 | // * functions: toggleAddonByID listAddons toggleAddons 18 | // 19 | // Copy/paste the code you want to run to the Firefox console 20 | // 21 | // If you paste all the text from this file into the console 22 | // then toggleAddons(); runs (it shows a 'prompt' popup with user interface, 23 | // and no changes are made until your input) 24 | // 25 | // You can also load/run this file in the console with: 26 | // javascript:(()=>{with(document){let s=createElement('script');s.src='file:///C:/Users/USERNAME/javascript/toggle_add-on_in_firefox_console.js';head.appendChild(s)}})(); 27 | // 28 | // Run in either: (1) 'about:addons' (Ctrl+Shift+A) then Web Console (Ctrl+Shift+K) 29 | // or: (2) Browser Console (Ctrl+Shift+J) 30 | // first enable the command input box in 'about:config': 31 | // user_pref("devtools.chrome.enabled", true); 32 | 33 | 34 | // Toggle an add-on between enabled/disabled (by id) 35 | // (get add-on id from 'about:support#addons-tbody' or "List add-ons" below) 36 | // id style is mostly "{ffffffff-ffff-ffff-ffff-ffffffffffff}" sometimes "foo@bar" 37 | // 38 | javascript:var toggleAddonByID=async function(id){var addon=await AddonManager.getAddonByID(id);addon.isActive?addon.disable():addon.enable();console.log((addon.isActive?"Enabled":"Disabled")+": "+addon.name+' "'+addon.id+'"')}; 39 | // toggleAddonByID("{ffffffff-ffff-ffff-ffff-ffffffffffff}"); 40 | // /* or */ 41 | // javascript:AddonManager.getAddonByID("put-add-on-id-here").then(addon=>{addon.isActive?addon.disable():addon.enable();console.log((addon.isActive?"Enabled":"Disabled")+": "+addon.name+' "'+addon.id+'"')}) 42 | 43 | 44 | // List add-ons 45 | // **** you should use 'about:addons' or 'about:support#addons-tbody' **** 46 | // this does a list in the console (lists: isActive?(+/-) name version "id") 47 | // either list all or put regex to show name matches only 48 | // 49 | javascript:var listAddons=async function(match=/.*/i){var addons=await AddonManager.getAddonsByTypes(["extension"]),info="";for(var addon of addons){if(match.test(addon.name)&&!(addon.isBuiltin||addon.isSystem)){info+=(addon.isActive?"+":"-")+' '+addon.name+" "+addon.version+'\t"'+addon.id+'"\n';};};console.log(info.split("\n").sort((a,b)=>a.replace(/^../,"").localeCompare(b.replace(/^../,""))).join("\n"));}; 50 | // listAddons(); 51 | // istAddons(/add-on-name/i); 52 | // istAddons(/name|name.*two|name3/i); 53 | 54 | 55 | // Interactive Add-ons Toggle between enabled/disabled (single or in bulk) 56 | // eg toggleAddons(); // user interface = popup prompt 57 | // choose the add-ons to toggle or search by names/all/enabled/disabled 58 | // * no add-on is toggled until you input the line number(s) to toggle 59 | // * the search pre-fills the input box with line numbers (which you can edit) 60 | // * prefix search names with + or - to only list enabled/disabled matches 61 | // * entering just either: - + .* lists disabled/enabled/all add-ons 62 | // * examples: name name|name.*two .* - + -name +name|name.*two 63 | // 64 | // only specify parameters if you want certain matches from the start: 65 | // (1) match: regex match of add-on names (pre-fills input box) 66 | // (2) filter: false list all add-ons 67 | // true just list those with name matching 68 | // (3) enabled: null enabled+disabled 69 | // true just enabled 70 | // false just disabled 71 | // toggleAddons(/^$/i,false,null); // default: no name match/list all/enabled+disabled 72 | // toggleAddons(/add-on-name/i,false,null); // match name/list all/enabled+disabled 73 | // toggleAddons(/name|name.*two|name3/i,true,null); // match names/list matches/enabled+disabled 74 | // toggleAddons(/name|name.*two|name3/i,true,false); // match names/list matches/just disabled 75 | // toggleAddons(/name|name.*two|name3/i,true,false); // match names/list matches/just enabled 76 | // 77 | // note when editing: expand code: sed 's/\/\*\*\//\/**\/\n/g; s/\/\*-/\/*\n-/g;' 78 | // condense code: tr -d '\n' 79 | // 80 | javascript:var toggleAddons=async function(match=/^$/i,filter=false,enabled=null/*boolean*/){/*--*/var addons,list=[],info="",spacer="",divider="\t\t",choices="";/*--*//*list*//*--*/addons=await AddonManager.getAddonsByTypes(["extension"]);/*--*/for(var addon of addons){/*------*/if(!(addon.isBuiltin||addon.isSystem)){/*----------*/list.push({'name':addon.name,'version':addon.version,'id':addon.id,'isActive':addon.isActive});/*------*/}/*--*/}/*--*//*sort*//*--*/list.sort((a,b)=>/*a.isActive==b.isActive?*/a.name.localeCompare(b.name)/*:b.isActive-a.isActive*/);/*--*//*info*//*--*/info="**** Toggle Add-ons between enabled/disabled ****\n";/*--*/info+="**** Filter by entering eg: name|foo.*bar - + .* +foo -bar ****\n";/*--*/info+="**** Only toggles when number(s) entered eg 1,2... ****\n";/*--*/if(typeof(DevToolsSocketStatus)=="undefined"){spacer="..";divider="\n"};/*--*/for(var i=0,l=list.length;i0&&choice<=list.length){/*--------------*/AddonManager.getAddonByID(list[(choice-1)].id).then(addon=>{/*------------------*/addon.isActive?addon.disable():addon.enable();/*------------------*/console.log((addon.isActive?"Enabled":"Disabled")+": "+addon.name+' "'+addon.id+'"')/*--------------*/})/*----------*/}/*------*/}/*--*/}/**/};/**//*run*//**/toggleAddons(); 81 | -------------------------------------------------------------------------------- /javascript/firefox-v109-change-order-under-extensions-button.js: -------------------------------------------------------------------------------- 1 | // JavaScript for Mozilla Firefox web console on 'about:addons' page 2 | // 3 | // Name : firefox-v109-change-order-under-extensions-button.js 4 | // Project : https://github.com/icpantsparti2/browser-bits 5 | // Version : 2023.03.17 6 | // File/Update : https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/javascript/firefox-v109-change-order-under-extensions-button.js 7 | // License (MIT): https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/LICENSE 8 | // Disclaimer : Use with care at your own risk 9 | // 10 | // This is only useful when you have a large amount of add-ons and need to 11 | // change the order shown under the "Extensions" (jigsaw piece) button. 12 | // For Firefox v109 onwards (until the UI has a better way to sort them, 13 | // beyond the right click pin/unpin which places them at the top). 14 | // 15 | // To run: 16 | // (1) open the 'about:addons' page (Ctrl+Shift+A) 17 | // (2) open the Web Console (Ctrl+Shift+K or F12) 18 | // (3) copy/paste the code into the Firefox web console and run 19 | // 20 | // There are three options: 21 | // option 1 (SIMPLE) add-on alphabetical order (1 step) 22 | // option 2 (OLD) with optional manual add-on sort (3 step) 23 | // option 3 (NEW) with drag and drop interface 24 | // option 3 will run if you copy and paste this whole file into the console 25 | // (the code for options 1 and 2 is within comments) 26 | 27 | 28 | 29 | 30 | // **** option 1 (SIMPLE) **** add-on alphabetical order (1 step) 31 | // What happens: 32 | // - paste the code into the web console and run 33 | // = this changes the about:config pref "browser.uiCustomization.state" 34 | // - the old and new values are output to the console (if you need to 35 | // keep them: right click, and copy object, paste/save in a text editor) 36 | // note: pinned add-ons might not move (unless you right click unpin them) 37 | // - close and re-open Firefox to see the changes 38 | // (if required, code can be saved in a bookmark URL, and dragged to console) 39 | // 40 | /* 41 | javascript:AddonManager.getAddonsByTypes(["extension"]).then(addons=>{var order=[];addons.sort((a,b)=>{return a.name.localeCompare(b.name);}).forEach(addon=>{if(!(addon.isBuiltin||addon.isSystem)){order.push(`"${addon.id.toLowerCase().replace(/[{}@.]/g,"_")}-browser-action"`);}});var oVal=Services.prefs.getStringPref("browser.uiCustomization.state");var nVal=oVal.replace(/(^.*,"unified-extensions-area":\[)[^\]]*(\],.*$)/,"$1"+order.join(",")+"$2");Services.prefs.setStringPref("browser.uiCustomization.state",nVal);console.log(`// old\n// Services.prefs.setStringPref("browser.uiCustomization.state", "${oVal.replace(/(["\\])/g,'\\$1')}");\n\n// new\nServices.prefs.setStringPref("browser.uiCustomization.state", "${nVal.replace(/(["\\])/g,'\\$1')}");\n`);console.log(`// about:config pref "browser.uiCustomization.state" changed, old/new values are shown above, ** please restart Firefox to apply **`);}); 42 | */ 43 | 44 | 45 | 46 | 47 | // **** option 2 (OLD) **** with optional manual add-on sort (3 step) 48 | // This generates a list with more code, which then generates further code for 49 | // setting: Services.prefs.setStringPref("browser.uiCustomization.state"... 50 | // What happens: 51 | // - We do this in three main steps, you have control and are given the 52 | // old setting value. The change is only applied when you run step 3. 53 | // (step 1) - paste the code into the web console and run 54 | // = this outputs to the console a list of addons/ids with 55 | // some further JavaScript code 56 | // - copy the console output (right click, and copy object) 57 | // (step 2) - keep as alphabetical order (and continue) 58 | // - or paste the code into a text editor and change the order 59 | // of the add-on name/id lines, then copy back to clipboard 60 | // - paste the code into the web console and run 61 | // = this outputs to the console the old (current) and a new 62 | // value for user preference "browser.uiCustomization.state" 63 | // - copy the console output (right click, and copy object) 64 | // note: pinned add-ons might not move (unless you right click unpin them) 65 | // (step 3) - (you can paste the code into a text editor to check it) 66 | // - paste the code into the web console and run 67 | // = this changes the value of "browser.uiCustomization.state" 68 | // - close and re-open Firefox to see the changes 69 | // (step 3 variation) 70 | // - you could alter "Services.prefs.setStringPref" to 71 | // "user_pref" and add that to a "user.js" file in your Firefox 72 | // profile folder, restart Firefox for the change to apply 73 | // then remove the line which you added to the "user.js" 74 | // 75 | /* step 1 - run to output code listing add-ons and ids */ 76 | /* 77 | AddonManager.getAddonsByTypes(["extension"]).then(addons => { 78 | var addonStr="",addonList=[]; 79 | addons.sort((a,b)=>{return a.name.localeCompare(b.name);}).forEach(addon => { 80 | if(!(addon.isBuiltin||addon.isSystem)) { 81 | addonStr=`${addon.id.toLowerCase().replace(/[{}@.]/g,"_")}-browser-action`; 82 | addonList.push(` /${''}* ${addon.name.padEnd(45)} *${''}/ '\\\\"${addonStr}\\\\"'`); 83 | } 84 | }); 85 | console.log(`/${''}* step 2 - edit addonOrder and run to output pref change code (old+new) *${''}/ 86 | var addonOrder=[\n ${addonList.join("\n ,")}\n]; 87 | var prefValue=Services.prefs.getStringPref("browser.uiCustomization.state").replace(/(["\\\\])/g,'\\\\$1'); 88 | var oldPref=\`Services.prefs.setStringPref("browser.uiCustomization.state", "\${prefValue}");\`; 89 | var newPref=oldPref.replace(/(^.*,\\\\"unified-extensions-area\\\\":\\\[)[^\\\]]*(\\\],.*$)/, "$1"+addonOrder.join(",")+"$2"); 90 | console.log(\`/${''}* step 3 - run to apply new pref value, then please restart Firefox *${''}/\\n\\n// old\\n// \${oldPref}\\n\\n// new\\n\${newPref}\\n\`);\n`); 91 | }); 92 | */ 93 | 94 | 95 | 96 | 97 | // **** option 3 (NEW) **** with drag and drop interface 98 | // What happens: 99 | // - paste the code into the web console and run 100 | // - a list of extensions is shown with alphabetical order 101 | // - [Get] button: if you want to Get the existing order from 102 | // about:config "browser.uiCustomization.state" 103 | // - drag and drop to arrange the order 104 | // - [Cancel] button: Cancel (without setting the new order) 105 | // - [Set] button: Set the new order for "unified-extensions-area" 106 | // in about:config "browser.uiCustomization.state" 107 | // (after this you must restart Firefox) 108 | // - the old and new values are output to the console (if you need to 109 | // keep them: right click, and copy object, paste/save in a text editor) 110 | // = this changes the about:config pref "browser.uiCustomization.state" 111 | // note: pinned add-ons might not move (unless you right click unpin them) 112 | // - close and re-open Firefox to see the changes 113 | // 114 | if ( (typeof(Services) == "undefined") || (typeof(AddonManager) == "undefined") 115 | || (typeof(AddonManager.getAddonsByTypes) == "undefined") ) { 116 | console.log("// please run this JavaScript on about:addons page"); 117 | } 118 | else { 119 | AddonManager.getAddonsByTypes(["extension"]).then(addons => { 120 | 121 | // create stylesheet and parent div (plus children: 1 div 3 buttons 1 ol) 122 | var ceoStyle=document.createElement("style") 123 | ceoStyle.innerText=` 124 | #ceo-main { position:fixed; top:0; left:0; z-index:99999; 125 | min-width:20em; max-width:70vw; 126 | min-height:3em; max-height:calc(90vh - 5em); 127 | background-color:DimGray; color:White; overflow:scroll; 128 | border-top:4em Solid DimGray; border-right:20px Solid DimGray; 129 | border-bottom:20px Solid DimGray; } 130 | #ceo-buttons { position:fixed; top:0; left:0; 131 | background-color:DimGray; color:White; padding:5px;} 132 | #ceo-buttons button { background-color:Salmon; color:Black; } 133 | #ceo-buttons button:hover { background-color:White; } 134 | #ceo-ol { margin:0px; } 135 | .ceo-li { background-color:Black; color:White; } 136 | .ceo-li:hover { cursor:grab; background-color:White; color:Black; } 137 | `; 138 | document.head.appendChild(ceoStyle) 139 | var ceoMain=document.createElement("div"); 140 | ceoMain.id="ceo-main"; 141 | document.body.appendChild(ceoMain); 142 | var ceoButtons=document.createElement("div"); 143 | ceoButtons.id="ceo-buttons"; 144 | ceoMain.appendChild(ceoButtons); 145 | var ceoSet=document.createElement("button"); 146 | ceoSet.textContent="\u2714 Set"; 147 | ceoSet.title='Set the new order for "unified-extensions-area" in about:config' 148 | +' "browser.uiCustomization.state" (after this you must restart Firefox)'; 149 | ceoButtons.appendChild(ceoSet); 150 | var ceoGet=document.createElement("button"); 151 | ceoGet.textContent="\u2248 Get"; 152 | ceoGet.title='Get the existing order from about:config "browser.uiCustomization.state"'; 153 | ceoButtons.appendChild(ceoGet); 154 | var ceoCancel=document.createElement("button"); 155 | ceoCancel.textContent="\u2718 Cancel"; 156 | ceoCancel.title='Cancel (without setting the new order)'; 157 | ceoButtons.appendChild(ceoCancel); 158 | var ceoOL=document.createElement("ol"); 159 | ceoOL.id="ceo-ol"; 160 | ceoMain.appendChild(ceoOL); 161 | 162 | // create add-ons list 163 | var ceoAddonIdStr="",ceoLI; 164 | addons.sort((a,b)=>{return a.name.localeCompare(b.name);}).forEach(addon => { 165 | if(!(addon.isBuiltin||addon.isSystem)) { 166 | ceoAddonIdStr=`${addon.id.toLowerCase().replace(/[{}@.]/g,"_")}-browser-action`; 167 | ceoLI=document.createElement("li"); 168 | ceoLI.className="ceo-li"; 169 | ceoLI.id=ceoAddonIdStr; 170 | ceoLI.title=ceoAddonIdStr; 171 | ceoLI.draggable="true"; 172 | ceoLI.textContent=`${addon.name}`; 173 | ceoOL.appendChild(ceoLI); 174 | } 175 | }); 176 | 177 | // drag and drop actions 178 | // ref: https://stackoverflow.com/questions/12332403/html5-ul-li-draggable 179 | var ceoList,ceoDrag,ceoDragId,ceoDragIx,ceoDropIx; 180 | document.addEventListener("dragstart", ({target}) => { 181 | ceoDrag=target; ceoDragId=target.id; 182 | ceoList=target.parentNode.children; 183 | [...ceoList].forEach((e,i)=>{if(e===ceoDrag) ceoDragIx=i;}); 184 | }); 185 | document.addEventListener("dragover", (event) => { 186 | event.preventDefault(); 187 | }); 188 | document.addEventListener("drop", ({target}) => { 189 | if(target.className == "ceo-li" && target.id !== ceoDragId) { 190 | ceoDrag.remove(ceoDrag); 191 | [...ceoList].forEach((e,i)=>{if(e===target) ceoDropIx=i;}); 192 | if(ceoDragIx > ceoDropIx) { target.before(ceoDrag); } else { target.after(ceoDrag); } 193 | } 194 | }); 195 | 196 | // button actions 197 | ceoCancel.addEventListener("click", function() { 198 | document.body.removeChild(ceoMain); 199 | document.head.removeChild(ceoStyle); 200 | }); 201 | ceoGet.addEventListener("click", function() { 202 | var ceoOldPref=Services.prefs.getStringPref("browser.uiCustomization.state"); 203 | var ceoOldOrder=('' 204 | +ceoOldPref.replace(/(^.*,"TabsToolbar":\[)([^\]]*)(\],.*$)/, "$2") 205 | +ceoOldPref.replace(/(^.*,"nav-bar":\[)([^\]]*)(\],.*$)/, "$2") 206 | +ceoOldPref.replace(/(^.*,"unified-extensions-area":\[)([^\]]*)(\],.*$)/, "$2") 207 | ).split('"'); 208 | [...ceoOldOrder].reverse().forEach(existingId=>{ 209 | ceoList=document.getElementsByClassName("ceo-li"); 210 | ceoDropIx=0; 211 | ceoDragIx=-1; 212 | [...ceoList].forEach((e,i)=>{if(e.id===existingId) ceoDragIx=i;}); 213 | if(ceoDragIx>-1){ 214 | ceoDrag=ceoList[ceoDragIx]; 215 | if(ceoList[ceoDropIx].id !== ceoDrag.id){ 216 | ceoDrag.remove(ceoDrag); 217 | ceoList[ceoDropIx].before(ceoDrag); 218 | } 219 | } 220 | }); 221 | }); 222 | ceoSet.addEventListener("click", function() { 223 | var ceoNewOrder=[],ceoOldPref,ceoNewPref,ceoOldStr,ceoNewStr; 224 | ceoList=document.getElementsByClassName("ceo-li"); 225 | [...ceoList].forEach(e=>ceoNewOrder.push(`"${e.id}"`)); 226 | document.body.removeChild(ceoMain); 227 | document.head.removeChild(ceoStyle); 228 | ceoOldPref=Services.prefs.getStringPref("browser.uiCustomization.state"); 229 | ceoNewPref=ceoOldPref.replace( 230 | /(^.*,"unified-extensions-area":\[)([^\]]*)(\],.*$)/, 231 | "$1"+ceoNewOrder.join(",")+"$3"); 232 | ceoNewStr=ceoOldStr=`Services.prefs.setStringPref("browser.uiCustomization.state", "`; 233 | ceoOldStr+=`${ceoOldPref.replace(/(["\\])/g,'\\$1')}");`; 234 | ceoNewStr+=`${ceoNewPref.replace(/(["\\])/g,'\\$1')}");`; 235 | console.log(`/*old*/ // ${ceoOldStr}\n\n/*new*/ // ${ceoNewStr}\n\n`); 236 | console.log(`// to copy old/new values: right click "Copy Object" on above`); 237 | console.log(`// close and re-open Firefox to see the Extension button changes`); 238 | Services.prefs.setStringPref("browser.uiCustomization.state", ceoNewPref); 239 | }); 240 | 241 | });} 242 | -------------------------------------------------------------------------------- /userscript/all_-_copy_link_on_click.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name all - Copy Link On Click 3 | // @namespace Violentmonkey Scripts 4 | // @match http*://*/* 5 | // @version 2024.01.22 6 | // @description click links to copy them (see NOTES below) 7 | // @license MIT 8 | // @grant GM_setClipboard 9 | // @grant GM_registerMenuCommand 10 | // @grant GM_addStyle 11 | // ==/UserScript== 12 | 13 | (function() { 14 | 15 | /**************** NOTES **************** 16 | 17 | - File/Update: https://github.com/icpantsparti2/browser-bits/blob/main/userscript/all_-_copy_link_on_click.user.js 18 | 19 | - MIT License: https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/LICENSE 20 | 21 | - this is alpha/experimental and may keep changing 22 | 23 | - ****************************************************************** 24 | *** remember to copy/paste your results before any page change *** 25 | ****************************************************************** 26 | 27 | - the cumulative links array is only for the current web page 28 | (it does not survive after page change, refesh, close, etc) 29 | 30 | - the "©©© Copy Array..." options are available during any "Enable:" modes 31 | 32 | - with "+++ Enable:Copy+..." options, clipboard copy with previous links 33 | 34 | - with "=== Enable:Copy1..." options, clipboard copy is that single link 35 | 36 | - with "@@@ Enable:Array+..." options, nothing is copied to the clipboard 37 | until you use a "©©© Copy Array..." option 38 | 39 | - the options are under the UserScript Extension toolbar button 40 | 41 | - thanks for the snippet/idea from: 42 | 2022.03.17 https://www.reddit.com/r/userscripts/comments/tf75y6/comment/i0z28um/ 43 | 2023.02.14 https://www.reddit.com/r/FirefoxAddons/comments/111h3g4/comment/j8iutou/ 44 | 2024.01.17 https://www.reddit.com/r/firefox/comments/198kv0o/ 45 | // copy link on middle click 46 | document.addEventListener('auxclick', event => { 47 | const closestAElement = event.target.closest('a'); 48 | if(closestAElement && closestAElement.href) { 49 | event.preventDefault(); 50 | GM_setClipboard(closestAElement.href); 51 | } 52 | }); 53 | 54 | ***************************************/ 55 | 56 | 'use strict'; 57 | 58 | /*************************************** 59 | Initial 60 | ***************************************/ 61 | 62 | var linksArray=[]; 63 | 64 | function addSourceToLinksArray() { 65 | linksArray.push( { 66 | url: window.location.href, 67 | name: document.title?document.title:window.location.href, 68 | nameMerged: document.title?document.title:window.location.href, 69 | duplicatedUrl: false, 70 | duplicatedUrlAndName: false, 71 | date: `${new Date().toJSON()}` /* only set for source page */ 72 | } ); 73 | } 74 | 75 | addSourceToLinksArray(); 76 | 77 | function setLinkHoverCSS(enable=true) { 78 | var css="" 79 | if(enable) { 80 | css=`a:hover { 81 | box-shadow: 82 | -2px -2px Yellow, 2px 2px OrangeRed, 83 | -4px -4px 5px OrangeRed, 4px 4px 5px Yellow, 84 | -2px -2px Yellow inset, 2px 2px OrangeRed inset, 85 | -4px -4px 5px OrangeRed inset, 4px 4px 5px Yellow inset 86 | !important; 87 | }`; 88 | } 89 | else { 90 | css=`a:hover { 91 | box-shadow: initial !important; 92 | }`; 93 | } 94 | GM_addStyle(css); 95 | } 96 | 97 | /*************************************** 98 | Event Handlers 99 | ***************************************/ 100 | 101 | function addToLinksArray(event) { 102 | const closestAElement = event.target.closest('a'); 103 | if(closestAElement && closestAElement.href) { 104 | event.preventDefault(); 105 | // check if seen before 106 | let name=closestAElement.innerText?closestAElement.innerText:closestAElement.href 107 | let duplicatedUrl=false 108 | let duplicatedUrlAndName=false 109 | let dupIndex=linksArray.map(x=>{return x.url;}).indexOf(closestAElement.href) 110 | if(dupIndex > -1) { 111 | duplicatedUrl=true; 112 | if(linksArray.filter(x=>{ 113 | if(x.url==closestAElement.href) return true; 114 | return false; 115 | }).map(x=>{return x.name;}).indexOf(name)>-1) 116 | { 117 | duplicatedUrlAndName=true; 118 | } 119 | else { 120 | linksArray[dupIndex].nameMerged+=' // '+name; 121 | } 122 | } 123 | // add to array 124 | linksArray.push( { 125 | url: closestAElement.href, 126 | // .innerHTML (.innerText || .textContent) 127 | name: name, 128 | nameMerged: name, 129 | duplicatedUrl: duplicatedUrl, 130 | duplicatedUrlAndName: duplicatedUrlAndName, 131 | date: "" /* only set for source page */ 132 | } ); 133 | } 134 | } 135 | 136 | function addToLinksArrayAndCopy(event) { 137 | addToLinksArray(event); 138 | copyLinksArrayLastEntry(); 139 | } 140 | 141 | function addToLinksArrayAndCopyAsMarkdown(event) { 142 | addToLinksArray(event); 143 | copyLinksArrayLastEntryAsMarkdown(); 144 | } 145 | 146 | function addToLinksArrayAndCumulativeCopy(event) { 147 | addToLinksArray(event); 148 | copyLinksArrayAsUrl(); 149 | } 150 | 151 | function addToLinksArrayAndCumulativeCopyAsMarkdown(event) { 152 | addToLinksArray(event); 153 | copyLinksArrayAsMarkdown(); 154 | } 155 | 156 | function preventLink(event) { 157 | const closestAElement = event.target.closest('a'); 158 | if(closestAElement && closestAElement.href) { 159 | event.preventDefault(); 160 | } 161 | } 162 | 163 | /*************************************** 164 | Event Listeners 165 | ***************************************/ 166 | 167 | function setLinkClickEvent( 168 | enable=true, // true (addEventListener) false (removeEventListener) 169 | mode='cumulative-md', // array copy copy-md cumulative cumulative-md 170 | clickType='auxclick' // click dblclick auxclick 171 | ) { 172 | if(clickType=="dblclick"){ 173 | // prevent click when double click 174 | enable?document.addEventListener('click', preventLink) 175 | :document.removeEventListener('click', preventLink); 176 | } 177 | switch(mode) { 178 | case "array": 179 | enable?document.addEventListener(clickType, addToLinksArray) 180 | :document.removeEventListener(clickType, addToLinksArray); 181 | break; 182 | case "copy": 183 | enable?document.addEventListener(clickType, addToLinksArrayAndCopy) 184 | :document.removeEventListener(clickType, addToLinksArrayAndCopy); 185 | break; 186 | case "copy-md": 187 | enable?document.addEventListener(clickType, addToLinksArrayAndCopyAsMarkdown) 188 | :document.removeEventListener(clickType, addToLinksArrayAndCopyAsMarkdown); 189 | break; 190 | case "cumulative": 191 | enable?document.addEventListener(clickType, addToLinksArrayAndCumulativeCopy) 192 | :document.removeEventListener(clickType, addToLinksArrayAndCumulativeCopy); 193 | break; 194 | case "cumulative-md": 195 | enable?document.addEventListener(clickType, addToLinksArrayAndCumulativeCopyAsMarkdown) 196 | :document.removeEventListener(clickType, addToLinksArrayAndCumulativeCopyAsMarkdown); 197 | break; 198 | } 199 | } 200 | 201 | /*************************************** 202 | Menu Handlers 203 | ***************************************/ 204 | 205 | function disableLinkClickEvents() { 206 | ['array','copy','copy-md','cumulative','cumulative-md'].forEach(mode=>{ 207 | ['click','dblclick','auxclick'].forEach(clickType=>{ 208 | setLinkClickEvent(false, mode, clickType); 209 | }); 210 | }); 211 | setLinkHoverCSS(false); 212 | } 213 | 214 | function enableAddLinkToArrayOnClick() { 215 | setLinkClickEvent(true, 'array', 'click') 216 | setLinkHoverCSS(true); 217 | } 218 | function enableAddLinkToArrayOnDoubleClick() { 219 | setLinkClickEvent(true, 'array', 'dblclick') 220 | setLinkHoverCSS(true); 221 | } 222 | function enableAddLinkToArrayOnMiddleClick() { 223 | setLinkClickEvent(true, 'array', 'auxclick') 224 | setLinkHoverCSS(true); 225 | } 226 | 227 | function enableCopyLinkOnClickAsUrl() { 228 | setLinkClickEvent(true,'copy','click'); 229 | setLinkHoverCSS(true); 230 | } 231 | function enableCopyLinkOnDoubleClickAsUrl() { 232 | setLinkClickEvent(true,'copy','dblclick'); 233 | setLinkHoverCSS(true); 234 | } 235 | function enableCopyLinkOnMiddleClickAsUrl() { 236 | setLinkClickEvent(true,'copy','auxclick'); 237 | setLinkHoverCSS(true); 238 | } 239 | 240 | function enableCopyLinkOnClickAsMarkdown() { 241 | setLinkClickEvent(true,'copy-md','click'); 242 | setLinkHoverCSS(true); 243 | } 244 | function enableCopyLinkOnDoubleClickAsMarkdown() { 245 | setLinkClickEvent(true,'copy-md','dblclick'); 246 | setLinkHoverCSS(true); 247 | } 248 | function enableCopyLinkOnMiddleClickAsMarkdown() { 249 | setLinkClickEvent(true,'copy-md','auxclick'); 250 | setLinkHoverCSS(true); 251 | } 252 | 253 | function enableCumulativeCopyLinkOnClickAsUrl() { 254 | setLinkClickEvent(true, "cumulative", 'click'); 255 | setLinkHoverCSS(true); 256 | } 257 | function enableCumulativeCopyLinkOnDoubleClickAsUrl() { 258 | setLinkClickEvent(true, "cumulative", 'dblclick'); 259 | setLinkHoverCSS(true); 260 | } 261 | function enableCumulativeCopyLinkOnMiddleClickAsUrl() { 262 | setLinkClickEvent(true, "cumulative", 'auxclick'); 263 | setLinkHoverCSS(true); 264 | } 265 | 266 | function enableCumulativeCopyLinkOnClickAsMarkdown() { 267 | setLinkClickEvent(true, "cumulative-md", 'click'); 268 | setLinkHoverCSS(true); 269 | } 270 | function enableCumulativeCopyLinkOnDoubleClickAsMarkdown() { 271 | setLinkClickEvent(true, "cumulative-md", 'dblclick'); 272 | setLinkHoverCSS(true); 273 | } 274 | function enableCumulativeCopyLinkOnMiddleClickAsMarkdown() { 275 | setLinkClickEvent(true, "cumulative-md", 'auxclick'); 276 | setLinkHoverCSS(true); 277 | } 278 | 279 | /*************************************** 280 | Text String Functions 281 | ***************************************/ 282 | 283 | function escapeHTML(str) { 284 | return (str+'') 285 | .replace(/&/g, "&") 286 | .replace(/"/g, """).replace(/'/g, "'") 287 | .replace(//g, ">"); 288 | } 289 | 290 | function escapeMD(str) { 291 | return (str+'').replace(/[_*\[\]\(\)]/g, "\\$&"); 292 | } 293 | 294 | function tidyLinkName(str) { 295 | return (str+'') 296 | .replace(/^[ \t\r\n]+/g,"") 297 | .replace(/[ \t\r\n]+$/g,"") 298 | .replace(/[\r\n]+/g," -- ") 299 | .replace(/[ \t]+/g," "); 300 | } 301 | 302 | function domainNameFromUrl(str) { 303 | if(/^(http|https):/.test(str)) { 304 | str=(str+'') 305 | .replace(/^[a-z]+:\/\//,"").replace(/\/.*$/,"") 306 | .replace(/^(www|old|mobile|m|mbasic|en)\./,""); 307 | } 308 | else { 309 | str=(str+'').replace(/:.*$/,""); 310 | if(str) str=`(${str})`; 311 | } 312 | if(str) str=`${str} - `; 313 | return str; 314 | } 315 | 316 | /*************************************** 317 | Copy/Clear Cumulative Links 318 | ***************************************/ 319 | 320 | function copyLinksArrayLastEntry() { 321 | GM_setClipboard(linksArray[linksArray.length-1].url); 322 | } 323 | 324 | function copyLinksArrayLastEntryAsMarkdown() { 325 | let domain=domainNameFromUrl(linksArray[linksArray.length-1].url); 326 | let name=tidyLinkName(linksArray[linksArray.length-1].name); 327 | GM_setClipboard(`1. [${escapeMD(`${domain}${name}`)}](${linksArray[linksArray.length-1].url})`); 328 | } 329 | 330 | function copyLinksArrayAsUrl() { 331 | GM_setClipboard(linksArray.filter(x=>{ 332 | if(x.duplicatedUrl) return false; 333 | // if(x.date=="") return true; 334 | // return false; 335 | return true; 336 | }).map(x=>{ 337 | if(x.date=="") { 338 | return x.url; 339 | } 340 | else { 341 | return `// [${x.date}] ${x.url}`; 342 | } 343 | 344 | }).join("\n")+"\n"); 345 | } 346 | 347 | function copyLinksArrayAsMarkdown() { 348 | GM_setClipboard(linksArray.filter(x=>{ 349 | if(x.duplicatedUrl) return false; 350 | // if(x.duplicatedUrlAndName) return false; 351 | return true; 352 | }).map(x=>{ 353 | let domain=domainNameFromUrl(x.url); 354 | let name=tidyLinkName(x.nameMerged); 355 | if(x.date=="") { 356 | return ` 1. [${escapeMD(`${domain}${name?name:x.url}`)}](${x.url})`; 357 | } 358 | else { 359 | return `1. [${escapeMD(`${domain}${name?name:x.url} [${x.date}]`)}](${x.url})`; 360 | } 361 | }).join("\n")+"\n"); 362 | } 363 | 364 | function clearLinksArray() { 365 | linksArray=[]; 366 | addSourceToLinksArray(); 367 | } 368 | 369 | /*************************************** 370 | Menu Options (UserScript Extension toolbar button) 371 | **************************************/ 372 | 373 | function showMoreOptions() { 374 | GM_registerMenuCommand("+++ Enable:Copy+|Click|Markdown", enableCumulativeCopyLinkOnClickAsMarkdown); 375 | GM_registerMenuCommand("+++ Enable:Copy+|Click|URL", enableCumulativeCopyLinkOnClickAsUrl); 376 | //GM_registerMenuCommand("+++ Enable:Copy+|Double Click|Markdown", enableCumulativeCopyLinkOnDoubleClickAsMarkdown); 377 | //GM_registerMenuCommand("+++ Enable:Copy+|Double Click|URL", enableCumulativeCopyLinkOnDoubleClickAsUrl); 378 | 379 | GM_registerMenuCommand("@@@ Enable:Array+|Middle Click", enableAddLinkToArrayOnMiddleClick); 380 | GM_registerMenuCommand("@@@ Enable:Array+|Click", enableAddLinkToArrayOnClick); 381 | //GM_registerMenuCommand("@@@ Enable:Array+|Double Click", enableAddLinkToArrayOnDoubleClick); 382 | 383 | GM_registerMenuCommand("©©© Copy Array|Markdown", copyLinksArrayAsMarkdown); 384 | GM_registerMenuCommand("©©© Copy Array|URL", copyLinksArrayAsUrl); 385 | 386 | GM_registerMenuCommand("=== Enable:Copy1|Middle Click|Markdown", enableCopyLinkOnMiddleClickAsMarkdown); 387 | GM_registerMenuCommand("=== Enable:Copy1|Middle Click|URL", enableCopyLinkOnMiddleClickAsUrl); 388 | GM_registerMenuCommand("=== Enable:Copy1|Click|Markdown", enableCopyLinkOnClickAsMarkdown); 389 | GM_registerMenuCommand("=== Enable:Copy1|Click|URL", enableCopyLinkOnClickAsUrl); 390 | //GM_registerMenuCommand("=== Enable:Copy1|Double Click|Markdown", enableCopyLinkOnDoubleClickAsMarkdown); 391 | //GM_registerMenuCommand("=== Enable:Copy1|Double Click|URL", enableCopyLinkOnDoubleClickAsUrl); 392 | } 393 | 394 | GM_registerMenuCommand("+++ Enable:Copy+|Middle Click|Markdown", enableCumulativeCopyLinkOnMiddleClickAsMarkdown); 395 | GM_registerMenuCommand("+++ Enable:Copy+|Middle Click|URL", enableCumulativeCopyLinkOnMiddleClickAsUrl); 396 | GM_registerMenuCommand("### Disable (Events We Enabled)", disableLinkClickEvents); 397 | GM_registerMenuCommand("--- Clear Array (page change clears)", clearLinksArray); 398 | GM_registerMenuCommand("::: Show More Options...", showMoreOptions); 399 | 400 | })(); 401 | -------------------------------------------------------------------------------- /javascript/firefox-list-enable-disable-add-ons-from-console.md: -------------------------------------------------------------------------------- 1 | ## Firefox List/Enable/Disable Add-ons from Console 2 | 3 | | File | firefox-list-enable-disable-add-ons-from-console.md | 4 | |:--------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 5 | | URL | [https://github.com/icpantsparti2/browser-bits/blob/main/javascript/firefox-list-enable-disable-add-ons-from-console.md](https://github.com/icpantsparti2/browser-bits/blob/main/javascript/firefox-list-enable-disable-add-ons-from-console.md) | 6 | | Version | 2022.11.09 | 7 | | License | (MIT) [https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/LICENSE](https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/LICENSE) | 8 | | ⚠️ | * **experimental** for **advanced users**
* **backup** your profile ([about:support](about:support) Profile Directory)
* **test** in a copy/new profile
* use with care **at your own risk** | 9 | 10 | ### Introduction 11 | 12 | - This is only useful if you need another way to toggle Firefox add-ons on/off
eg: in bulk, for testing and experimenting 13 | - JavaScript for use in Firefox web console 14 | - There is also an interactive option 15 | 16 | ### Instructions 17 | 18 | - Run the required JavaScript code (copy/paste) in a Firefox console: 19 | - Web Console *(best way)* 20 | - open Firefox [about:addons](about:addons) page (Ctrl+Shift+A),
the page titled "Manage Your Extensions" 21 | - open the Web Console (Ctrl+Shift+K or F12/Console) 22 | - Browser Console *(alternative way)* 23 | - requires Firefox [about:config](about:config) `devtools.chrome.enabled` set to `true` 24 | - open the Firefox Browser Console (Ctrl+Shift+J) 25 | - Start by using the first option to get the current add-on state and the **add-on ids** (some other options need the ids) 26 | - Optionally, you could save individual code snippets as a bookmarklet (ie create a bookmark and put the URL as `javascript:` followed by the code), although in this case you cannot click them to run, however you can drag the bookmarklet into the console input box 27 | 28 | ### Useful Links 29 | 30 | - https://firefox-source-docs.mozilla.org/toolkit/mozapps/extensions/addon-manager/AddonManager.html 31 | 32 | ### Content 33 | 34 | - [list your add-ons, **ids** and state](#list-your-add-ons-ids-and-state) 35 | - [list your add-ons as links to their Mozilla Add-ons website page](#list-your-add-ons-as-links-to-their-mozilla-add-ons-website-page) 36 | - [about:addons links for Mozilla add-ons website pages (temporary)](#aboutaddons-links-for-mozilla-add-ons-website-pages-temporary) 37 | - [about:addons compact style (temporary)](#aboutaddons-compact-style-temporary) 38 | - [toggle (enable/disable) add-ons by **id**](#toggle-enabledisable-add-ons-by-id) 39 | - [disable add-ons by **id**](#disable-add-ons-by-id) 40 | - [enable add-ons by **id**](#enable-add-ons-by-id) 41 | - [disable all add-ons](#disable-all-add-ons) 42 | - [enable all add-ons](#enable-all-add-ons) 43 | - [reload active add-ons](#reload-active-add-ons) 44 | - [interactive toggle (enable/disable) add-ons](#interactive-toggle-enabledisable-add-ons) 45 | 46 |
47 | 48 | ### list your add-ons, **ids** and state 49 | 50 | - First, run this code to make an add-ons list in the console 51 | 52 | - The list shows: add-on id, +/- *(enabled/disabled)*, name, version 53 | 54 | - Suggest you copy/paste/save the list with a text editor for later reference *(right click on the results and "Copy Object")* 55 | 56 | - You will need some of these **ids** when using some of the other options 57 | 58 | ```javascript 59 | /* list your firefox add-ons, ids and state */ 60 | AddonManager.getAddonsByTypes(["extension"]).then(addons => { 61 | var list=""; 62 | addons.sort( (a,b) => { 63 | if (a.isActive > b.isActive) return -1; 64 | if (a.isActive < b.isActive) return 1; 65 | return a.name.localeCompare(b.name); 66 | }).forEach(addon => { 67 | if(!(addon.isBuiltin||addon.isSystem)) { 68 | list+=("'"+addon.id+"',").padEnd(45) 69 | +" /* "+(addon.isActive?"+":"-") 70 | +" "+addon.name+" ("+addon.version+")" 71 | //+(addon.creator?" "+addon.creator.name:"") 72 | +" */\n"; 73 | } 74 | }); 75 | console.log(list); 76 | }); 77 | ``` 78 | 79 |
80 | 81 | ### list your add-ons as links to their Mozilla add-ons website page 82 | 83 | - Sometimes `https://addons.mozilla.org/firefox/addon/ID` will redirect to the add-on page 84 | - examples: [uBlock0@raymondhill.net](https://addons.mozilla.org/firefox/addon/uBlock0@raymondhill.net) for [ublock-origin](https://addons.mozilla.org/firefox/addon/ublock-origin/) and [{aecec67f-0d10-4fa7-b7c7-609a2db280cf}](https://addons.mozilla.org/firefox/addon/%7Baecec67f-0d10-4fa7-b7c7-609a2db280cf%7D) for [violentmonkey](https://addons.mozilla.org/firefox/addon/violentmonkey/) 85 | - you can see the add-on IDs on the `about:support#addons` page 86 | - if you have many add-ons the code below generates a html page of these links 87 | - optionally save the page created with right click "Save Page As..." 88 | - tip: make an account and extensions collection on the Mozilla Add-ons website 89 | - alternatively: see the section below for "about:addons links..." 90 | 91 | ```javascript 92 | /* list your add-ons as links to their Mozilla Add-ons website page */ 93 | AddonManager.getAddonsByTypes().then(addons => { 94 | /* ["extension","dictionary","theme"] */ 95 | var titleStr=`Firefox Add-ons ${new Date().toJSON().replace(/[:.]/g,"-")}`; 96 | console.log(`/* ${titleStr} */`); 97 | function escapeHTML(unsafe) { 98 | return unsafe.replace( 99 | /[\u0000-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u00FF]/g, 100 | c => '&\u{0023}' + ('000' + c.charCodeAt(0)).slice(-4) + ';' 101 | ); 102 | } 103 | var iLink1="",iLink2="",dLink1="",dLink2="",dLink3="", 104 | vLink1="",vLink2="",vLink3="",rLink1="",rLink2="",rLink3="",hovLink=""; 105 | var list=`\n\n${'' 106 | } ${titleStr.toLowerCase().replace(/ /g,"-")}.html\n${'' 107 | } \n${'' 108 | } \n\n\n\n \n${'' 128 | } \n${'' 129 | } \n${'' 130 | } \n${'' 131 | } \n${'' 132 | } \n${'' 133 | } \n${'' 134 | } \n \n \n \n${'' 135 | } \n \n \n \n${'' 136 | } \n \n \n\n`; 137 | addons.sort( (a,b) => { 138 | /*if (a.isActive > b.isActive) return -1; 139 | if (a.isActive < b.isActive) return 1;*/ 140 | if (a.type < b.type) return -1; 141 | if (a.type > b.type) return 1; 142 | if (a.isBuiltin < b.isBuiltin) return -1; 143 | if (a.isBuiltin > b.isBuiltin) return 1; 144 | /*if (a.isSystem < b.isSystem) return -1; 145 | if (a.isSystem > b.isSystem) return 1; */ 146 | return a.name.localeCompare(b.name); 147 | }).forEach(addon => { 148 | if(addon.isBuiltin||addon.isSystem||addon.type=="plugin") { 149 | iLink1="";iLink2=""; 150 | dLink1="";dLink2="";dLink3=""; 151 | vLink1="";vLink2="";vLink3=""; 152 | rLink1="";rLink2="";rLink3=""; 153 | hovLink=""; 154 | } 155 | else { 156 | iLink1=``; 157 | iLink2=``; 158 | dLink1=``; 159 | dLink2=`\u{2B07}\u{FE0F}`; 160 | dLink3=``; 161 | vLink1=``; 162 | vLink2=`\u{1F1FB}`; 163 | vLink3=``; 164 | rLink1=``; 165 | rLink2=`\u{1F1F7}`; 166 | rLink3=``; 167 | hovLink=" td-hov"; 168 | } 169 | list+=` \n${'' 170 | } \n${'' 171 | } \n${'' 172 | } \n${'' 173 | } \n${'' 174 | } \n${'' 176 | } \n${'' 177 | } \n${'' 178 | } \n${'' 179 | } \n\n`; 180 | }); 181 | list+=" \n
${titleStr}
NameTypeVersionEnabledID
${iLink1}
${escapeHTML(addon.name)}
${iLink2}
${addon.type}${addon.isBuiltin?` (builtin)`:""}${'' 175 | }${addon.isSystem?` (system)`:""}${escapeHTML(addon.version)}${addon.isActive}${escapeHTML(addon.id)}
\n



\n\n"; 182 | console.log(list); 183 | console.log(`data:text/html;charset=UTF-8;base64,${ 184 | btoa(unescape(encodeURIComponent(list)))}`); 185 | console.log(`/* if a "${titleStr.toLowerCase().replace(/ /g,"-")}" ${'' 186 | }page does not open, then copy the data/base64 code above into a ${'' 187 | }new tabs URL box (use right click "Copy Object"), or save and ${'' 188 | }open the html code shown above that */`); 189 | window.open(`data:text/html;charset=UTF-8;base64,${ 190 | btoa(unescape(encodeURIComponent(list)))}`,'_blank').focus(); 191 | }); 192 | ``` 193 | 194 | ### about:addons links for Mozilla add-ons website pages (temporary) 195 | 196 | - show links for the add-on pages at `https://addons.mozilla.org/firefox/addon/...` 197 | - run this in the Web Console (Ctrl+Shift+K) while on the about:addons page 198 | - alternatively: see the section above for "list your add-ons as links..." 199 | 200 | ```javascript 201 | /* firefox about:addons links for Mozilla add-ons website pages (temporary) */ 202 | [...document.querySelectorAll('a[href^="addons:"]')].forEach(e=>{ 203 | e.parentElement.insertAdjacentHTML("beforebegin" 204 | ,`\u{D83D}\u{DD17} `); 207 | }); 208 | ``` 209 | 210 |
211 | 212 | ### about:addons compact style (temporary) 213 | 214 | - re-style the "Manage Your Extensions" page as a narrow line list 215 | - run this in the Web Console (Ctrl+Shift+K) while on the about:addons page 216 | - tip: if you always want a compact style you can use style sheets eg: 217 | - https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/firefox-style/chrome/userContent.css 218 | 219 | ```javascript 220 | /* firefox about:addons compact style (temporary) */ 221 | [...document.querySelectorAll(".addon.card .addon-icon")] 222 | .forEach(e => { e.style.width = "18px"; e.style.height = "18px"; }); 223 | [...document.querySelectorAll(".addon.card .addon-description")] 224 | .forEach(e => { e.style.display = "none"; }); 225 | [...document.querySelectorAll(".addon.card")] 226 | .forEach(e => { e.style.margin = "3px"; e.style.padding = 0; }); 227 | ``` 228 | 229 |
230 | 231 | ### toggle (enable/disable) add-ons by **id** 232 | 233 | ```javascript 234 | /* toggle firefox add-ons by id */ 235 | AddonManager.getAddonsByIDs( [ 236 | 'uBlock0@raymondhill.net', /* uBlock Origin */ 237 | '{aecec67f-0d10-4fa7-b7c7-609a2db280cf}', /* Violentmonkey */ 238 | ] ).then(addons => { addons.forEach(addon => { 239 | addon.isActive?addon.disable():addon.enable(); 240 | }); }); 241 | ``` 242 | 243 | ### disable add-ons by **id** 244 | 245 | ```javascript 246 | /* disable firefox add-ons by id */ 247 | AddonManager.getAddonsByIDs( [ 248 | 'uBlock0@raymondhill.net', /* uBlock Origin */ 249 | '{aecec67f-0d10-4fa7-b7c7-609a2db280cf}', /* Violentmonkey */ 250 | ] ).then(addons => { addons.forEach(addon => { 251 | addon.disable(); 252 | }); }); 253 | ``` 254 | 255 | ### enable add-ons by **id** 256 | 257 | ```javascript 258 | /* enable firefox add-ons by id */ 259 | AddonManager.getAddonsByIDs( [ 260 | 'uBlock0@raymondhill.net', /* uBlock Origin */ 261 | '{aecec67f-0d10-4fa7-b7c7-609a2db280cf}', /* Violentmonkey */ 262 | ] ).then(addons => { addons.forEach(addon => { 263 | addon.enable(); 264 | }); }); 265 | ``` 266 | 267 |
268 | 269 | ### disable all add-ons 270 | 271 | ```javascript 272 | /* disable all firefox add-ons */ 273 | AddonManager.getAddonsByTypes(["extension"]).then(addons => { 274 | addons.forEach(addon => { 275 | if(!(addon.isBuiltin||addon.isSystem)) { addon.disable(); } 276 | }); 277 | }); 278 | ``` 279 | 280 | ### enable all add-ons 281 | 282 | ```javascript 283 | /* enable all firefox add-ons */ 284 | AddonManager.getAddonsByTypes(["extension"]).then(addons => { 285 | addons.forEach(addon => { 286 | if(!(addon.isBuiltin||addon.isSystem)) { addon.enable(); } 287 | }); 288 | }); 289 | ``` 290 | 291 | ### reload active add-ons 292 | 293 | ```javascript 294 | /* reload active firefox add-ons */ 295 | AddonManager.getActiveAddons(["extension"]).then(({addons}) => { 296 | addons.forEach(addon => { 297 | if(!(addon.isBuiltin||addon.isSystem||addon.hidden)) addon.reload(); 298 | }); 299 | }); 300 | ``` 301 | 302 |
303 | 304 | ### interactive toggle (enable/disable) add-ons 305 | 306 | - shows a simple popup prompt user interface 307 | 308 | - choose the add-ons to toggle or search by names/all/enabled/disabled 309 | 310 | - **note:** "line numbers" are used to reference the add-ons, and these will change order (eg if you install/un-install add-ons, etc). If you need exact ids use the List/Toggle/Disable/Enable code options instead. 311 | 312 | - no add-on is toggled until you input the "line number(s)" to toggle 313 | 314 | - searching pre-fills the input box with "line numbers" (which you can edit) 315 | 316 | - prefix search names with + or - to only list enabled/disabled matches 317 | 318 | - entering just either: - + .* lists disabled/enabled/all add-ons 319 | 320 | - examples: name name|name.*two .* - + -name +name|name.*two 321 | 322 | - to run the function enter: `toggleAddons();` 323 | 324 | ```javascript 325 | /* interactive firefox add-ons toggle */ 326 | var toggleAddons=async function( 327 | match=/^$/i, filter=false, enabled=null /*boolean*/) { 328 | var addons,list=[],info="",spacer="",divider="\t\t",choices=""; 329 | /*list*/ 330 | addons=await AddonManager.getAddonsByTypes(["extension"]); 331 | for(var addon of addons){ 332 | if(!(addon.isBuiltin||addon.isSystem)){ 333 | list.push({'name':addon.name,'version':addon.version, 334 | 'id':addon.id,'isActive':addon.isActive}); 335 | } 336 | } 337 | /*sort*/ 338 | list.sort((a,b)=>a.name.localeCompare(b.name)); 339 | /*info*/ 340 | info="**** Toggle Add-ons between enabled/disabled ****\n"; 341 | info+="**** Filter by entering eg: name|foo.*bar - + .* +foo -bar ****\n"; 342 | info+="**** Only toggles when line numbers entered eg 1,2... ****\n"; 343 | if(typeof(DevToolsSocketStatus)=="undefined"){spacer="..";divider="\n"}; 344 | for(var i=0,l=list.length;i0 && choice<=list.length){ 379 | AddonManager.getAddonByID(list[(choice-1)].id).then(addon=>{ 380 | addon.isActive?addon.disable():addon.enable(); 381 | console.log(("'"+addon.id+"',").padEnd(45)+" " 382 | +("/* "+(addon.isActive?"Enabled":"Disabled") 383 | +": "+addon.name+" */").padEnd(60)+" // "); 384 | }); 385 | } 386 | } 387 | } 388 | }; 389 | toggleAddons(); 390 | ``` 391 | 392 | - Advanced Options 393 | 394 | - specify parameters if you want certain matches from the start 395 | 396 | - toggleAddons(match, filter, enabled); 397 | 398 | | Parameter | Value | Description | 399 | | --------- | ---------- | ------------------------------------------ | 400 | | match | `/regex/i` | match add-on names (to pre-fill input box) | 401 | | | /^$/i | (default) | 402 | | filter | false | list all add-ons (default) | 403 | | | true | only list add-ons with name match | 404 | | enabled | null | show enabled+disabled add-ons (default) | 405 | | | false | only show disabled add-ons | 406 | | | true | only show enabled add-ons | 407 | 408 | ```javascript 409 | /* advanced options: toggleAddons(match, filter, enabled); */ 410 | toggleAddons(/^$/i, false, null); /* default show all toggleAddons(); */ 411 | toggleAddons(/ublock/i); /* show all with matches selected */ 412 | toggleAddons(/ublock|v.*monkey/i, true); /* show matches */ 413 | toggleAddons(/ublock|v.*monkey/i, true, false); /* show disabled matches */ 414 | toggleAddons(/ublock|v.*monkey/i, true, true); /* show enabled matches */ 415 | ``` 416 | 417 |
418 | -------------------------------------------------------------------------------- /firefox-style/chrome/userContent.css: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | /* [FIREFOX-PROFILE-FOLDER]/chrome/userContent.css 3 | /*------------------------------------------------------------------------------ 4 | /* File/Update : https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/firefox-style/chrome/userContent.css 5 | /* Version : 2023.12.12 6 | /* License (MIT): https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/LICENSE 7 | /* Project : https://github.com/icpantsparti2/browser-bits 8 | /* Disclaimer : Use with care at your own risk 9 | /*------------------------------------------------------------------------------ 10 | /* Summary : for re-styling some elements of firefox about:* pages 11 | /* (eg: compact layout) 12 | /* (also see: https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/firefox-style/chrome/userChrome.css) 13 | /*------------------------------------------------------------------------------ 14 | /* 1) find your Firefox "Profile Directory" (load web page "about:support") 15 | /* eg: C:\Users\USERNAME\AppData\Roaming\Mozilla\Firefox\Profiles\XXXXXXXX.default 16 | /* eg: /home/USERNAME/.mozilla/firefox/XXXXXXXX.default 17 | /* 2) make a folder there called "chrome" 18 | /* 3) choose: 19 | /* a) move/save this file as "userContent.css" inside the "chrome" folder 20 | /* or b) save this file as "userContent-icpantsparti.css" in "chrome" folder 21 | /* and create/edit your "userContent.css" adding this line near the top: 22 | /* @import "./userContent-icpantsparti.css"; 23 | /* 4) enable/disable sections by editing the preceeding line(s) as either: /**/ /* 24 | /* 5) load web page 'about:config', or create/edit a file in the profile folder 25 | /* called "user.js" and set the following: 26 | /* user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); 27 | /* 6) close and reopen firefox 28 | /* *) to "uninstall" remove or rename the "userContent.css" file 29 | /*------------------------------------------------------------------------------ 30 | /* Notes: 31 | /* * This is a collection of userContent.css code snippets 32 | /* * #id and .class names are by Mozilla from Firefox CSS structure 33 | /* * CSS selectors can change between Firefox versions without notice/support 34 | /*------------------------------------------------------------------------------ 35 | /* for 'Useful links' + 'Some Example Firefox CSS "Themes" links': 36 | /* see: https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/firefox-style/chrome/userChrome.css 37 | /*------------------------------------------------------------------------------ 38 | /* Other Notes: 39 | /* FF103: -moz-accent-color -moz-accent-color-foreground now: AccentColor AccentColorText 40 | /* https://www.reddit.com/r/FirefoxCSS/comments/w9t89v/tab_bar_windows_accent_color_in_firefox_103/ 41 | /*------------------------------------------------------------------------------ 42 | /* Acknowledgments: thanks to the links shown for useful info 43 | /******************************************************************************/ 44 | 45 | 46 | 47 | 48 | /******************************************************************************* 49 | /* The sections in the code below are: 50 | /* optionally import other "userContent-____.css" files 51 | /* highlight favorites on about:about 52 | /* compact about:profiles 53 | /* compact about:config 54 | /* compact about:addons 55 | /* about:addons - color add-on names 56 | /* compact about:preferences 57 | /* highlight certain file names under [Browser Toolbox] [Style Editor] 58 | /******************************************************************************/ 59 | 60 | 61 | 62 | 63 | /******************************************************************************* 64 | /* ### optionally import other "userContent-____.css" files 65 | /*------------------------------------------------------------------------------ 66 | /* (any imports must be here at the top) 67 | /******************************************************************************/ 68 | /**/ @import "./userContent-my-extras.css"; /**/ 69 | 70 | 71 | 72 | 73 | /******************************************************************************* 74 | /* ### highlight favorites on about:about 75 | /*------------------------------------------------------------------------------ 76 | /* highlight some of the links to other 'about:...' pages 77 | /******************************************************************************/ 78 | /**/ 79 | @-moz-document url-prefix(about:about) { 80 | a[href="about:addons"], a[href="about:config"], a[href="about:debugging"], 81 | a[href="about:downloads"], a[href="about:preferences"], 82 | a[href="about:profiles"], a[href="about:support"] { 83 | font-weight: bold !important; 84 | border: 2px solid AccentColor !important; 85 | padding: 0px 2px !important; 86 | } 87 | } 88 | /**/ 89 | 90 | 91 | 92 | 93 | /******************************************************************************* 94 | /* ### compact about:profiles 95 | /*------------------------------------------------------------------------------ 96 | /* tip: bookmark about:profiles for easy access profile switching 97 | /* (eg: place it on the bookmarks toolbar or home button) 98 | /* https://www.reddit.com/r/FirefoxCSS/comments/bmy2hm/backgroundimages_in_aboutpreferences_and/ 99 | /******************************************************************************/ 100 | /**/ 101 | @-moz-document url-prefix(about:profiles) { 102 | hr, table tr:nth-child(1), th { 103 | display: none !important; 104 | } 105 | div { 106 | margin: 0 !important; 107 | padding: 0 !important; 108 | border: 0 !important; 109 | page-break-inside: avoid !important; 110 | } 111 | #profiles 112 | { 113 | column-count: 2; 114 | column-gap: 0; 115 | } 116 | #profiles div 117 | { 118 | width: 98% !important; 119 | margin: 8px 0 !important; 120 | } 121 | h1, h2 { 122 | margin: 0 !important; 123 | background-color: color-mix(in srgb, White 40%, AccentColor) !important; 124 | color: color-mix(in srgb, Black 40%, AccentColor) !important; 125 | font-size: 1.1em !important; 126 | font-weight: bold !important; 127 | } 128 | h3 { 129 | margin: 0 !important; 130 | font-size: 0.7em !important; 131 | } 132 | table, tr, th, td { 133 | height: unset !important; 134 | width: unset !important; 135 | padding-top: 0 !important; 136 | padding-bottom: 0 !important; 137 | border-collapse: collapse !important; 138 | border: 0 !important; 139 | background-color: unset !important; 140 | color: unset !important; 141 | } 142 | button { 143 | min-height: unset !important; 144 | height: unset !important; 145 | padding: 2px 4px !important; 146 | margin: 1px 2px !important; 147 | border: 1px dotted !important; 148 | font-weight: normal !important; 149 | } 150 | } 151 | /**/ 152 | 153 | 154 | 155 | 156 | /******************************************************************************* 157 | /* ### compact about:config 158 | /*------------------------------------------------------------------------------ 159 | /* also show AccentColor mark next to modified preferences 160 | /* https://github.com/Aris-t2/CustomCSSforFx/css/aboutconfig/aboutconfig_compact_appearance.css 161 | /******************************************************************************/ 162 | /**/ 163 | @-moz-document url-prefix(about:config) { 164 | *:not(.config-background) { 165 | font-size: 0.95em !important; 166 | min-height: 1em !important; 167 | } 168 | table { 169 | margin-bottom: 5em !important; 170 | border: 0 !important; 171 | } 172 | th, td { 173 | vertical-align: top !important; 174 | border: 0 !important; 175 | padding-block: 0 !important; 176 | } 177 | .has-user-value { 178 | box-shadow: 5px 0px AccentColor inset, -2px 0px AccentColor inset; 179 | } 180 | .has-user-value .cell-value { 181 | box-shadow: 2px 0px AccentColor inset; 182 | } 183 | 184 | table button { 185 | margin-block: 0 !important; 186 | height: 1.5em !important; 187 | vertical-align: middle !important; 188 | } 189 | 190 | span[data-l10n-args^='{"value":"0'], 191 | span[data-l10n-args^='{"value":"1'], 192 | span[data-l10n-args^='{"value":"2'], 193 | span[data-l10n-args^='{"value":"3'], 194 | span[data-l10n-args^='{"value":"4'], 195 | span[data-l10n-args^='{"value":"5'], 196 | span[data-l10n-args^='{"value":"6'], 197 | span[data-l10n-args^='{"value":"7'], 198 | span[data-l10n-args^='{"value":"8'], 199 | span[data-l10n-args^='{"value":"9'], 200 | span[data-l10n-args^='{"value":"-'] 201 | { 202 | color: black; 203 | background-color: gold; 204 | } 205 | span[data-l10n-args^='{"value":"true"'] { 206 | color: black; 207 | background-color: limegreen; 208 | } 209 | span[data-l10n-args^='{"value":"false"'] { 210 | color: white; 211 | background-color: tomato; 212 | } 213 | 214 | tr.add { 215 | opacity: 0.5 !important; 216 | } 217 | tr.add > th, tr.add > td { 218 | white-space: nowrap !important; 219 | overflow: hidden !important; 220 | text-overflow: ellipsis !important; 221 | padding-top: 1em !important; 222 | } 223 | 224 | } 225 | /**/ 226 | 227 | 228 | 229 | 230 | /******************************************************************************* 231 | /* ### compact about:addons 232 | /*------------------------------------------------------------------------------ 233 | /* also show add-ons in a column layout (set your "column-count:" in code below) 234 | /* https://github.com/Aris-t2/CustomCSSforFx/css/aboutaddons/addonlists_compact_fx68.css 235 | /* https://github.com/Aris-t2/CustomCSSforFx/css/aboutaddons/addonlists_compact_more_compact_fx72.css 236 | /* https://www.reddit.com/r/FirefoxCSS/comments/g9imrc/enlarge_width_of_addons_manager_aboutaddons/ 237 | /* notes: 238 | /* or: url-prefix(chrome://mozapps/content/extensions/aboutaddons.html) 239 | /* old: url-prefix(chrome://mozapps/content/extensions/aboutaddons.xhtml) 240 | /* old: url-prefix(chrome://mozapps/content/extensions/extensions.xul) 241 | /* box-shadow: none|h-offset v-offset blur spread color |inset|initial|inherit; 242 | /* :root{ --section-width: initial !important } 243 | /* opacity: 1 !important; 244 | /* color: color-mix(in srgb, Black 40%, AccentColor) !important; 245 | /*------------------------------------------------------------------------------ 246 | /* notes (to show all builtin (and expired) themes): 247 | /* https://www.reddit.com/r/firefox/comments/uq26ao/bringing_back_your_preferred_colorways/ 248 | /* resource://builtin-themes/colorways/ 249 | /* in user.js (about:config) set: 250 | /* user_pref("browser.theme.colorway-closet", false); 251 | /* user_pref("browser.theme.retainedExpiredThemes", "[\"abstract-balanced-colorway@mozilla.org\",\"abstract-bold-colorway@mozilla.org\",\"abstract-soft-colorway@mozilla.org\",\"cheers-balanced-colorway@mozilla.org\",\"cheers-bold-colorway@mozilla.org\",\"cheers-soft-colorway@mozilla.org\",\"elemental-balanced-colorway@mozilla.org\",\"elemental-bold-colorway@mozilla.org\",\"elemental-soft-colorway@mozilla.org\",\"foto-balanced-colorway@mozilla.org\",\"foto-bold-colorway@mozilla.org\",\"foto-soft-colorway@mozilla.org\",\"graffiti-balanced-colorway@mozilla.org\",\"graffiti-bold-colorway@mozilla.org\",\"graffiti-soft-colorway@mozilla.org\",\"lush-balanced-colorway@mozilla.org\",\"lush-bold-colorway@mozilla.org\",\"lush-soft-colorway@mozilla.org\",\"activist-balanced-colorway@mozilla.org\",\"activist-bold-colorway@mozilla.org\",\"activist-soft-colorway@mozilla.org\",\"2022blue-colorway@mozilla.org\",\"dreamer-balanced-colorway@mozilla.org\",\"dreamer-bold-colorway@mozilla.org\",\"dreamer-soft-colorway@mozilla.org\",\"expressionist-balanced-colorway@mozilla.org\",\"expressionist-bold-colorway@mozilla.org\",\"expressionist-soft-colorway@mozilla.org\",\"2022green-colorway@mozilla.org\",\"innovator-balanced-colorway@mozilla.org\",\"innovator-bold-colorway@mozilla.org\",\"innovator-soft-colorway@mozilla.org\",\"2022orange-colorway@mozilla.org\",\"playmaker-balanced-colorway@mozilla.org\",\"playmaker-bold-colorway@mozilla.org\",\"playmaker-soft-colorway@mozilla.org\",\"2022purple-colorway@mozilla.org\",\"2022red-colorway@mozilla.org\",\"visionary-balanced-colorway@mozilla.org\",\"visionary-bold-colorway@mozilla.org\",\"visionary-soft-colorway@mozilla.org\",\"2022yellow-colorway@mozilla.org\"]"); 252 | /******************************************************************************/ 253 | /**/ 254 | @-moz-document url-prefix(about:addons) { 255 | 256 | :root addon-card:not([expanded="true"]) { 257 | --addon-icon-size: 18px !important; 258 | } 259 | 260 | #main { max-width: 95% !important; } 261 | 262 | addon-list[type="extension"] .extension-enabled-section, 263 | addon-list[type="extension"] .extension-disabled-section 264 | { 265 | margin-bottom: 4px !important; 266 | column-count: 3; 267 | column-gap: 0; 268 | } 269 | 270 | addon-list[type="extension"] .list-section-heading { 271 | margin: 0 !important; 272 | column-span: all; 273 | } 274 | 275 | 276 | 277 | addon-card:not([expanded="true"]) .addon.card .addon-card-collapsed { 278 | overflow:hidden !important; 279 | } 280 | 281 | addon-card:not([expanded="true"]) .addon.card .addon-description, 282 | addon-list[type="extension"] addon-card:not([expanded="true"]) .update-postponed-bar, 283 | addon-list[type="extension"] addon-card:not([expanded="true"]) .addon-card-message, 284 | addon-list[type="extension"] .pending-uninstall 285 | { 286 | display: none !important; 287 | } 288 | 289 | addon-list:not([type="theme"]) addon-card:not([expanded="true"]) .addon.card, 290 | addon-list[type="theme"] addon-card:not([expanded="true"]) .addon.card 291 | { 292 | margin-top: 0 !important; 293 | margin-bottom: 0 !important; 294 | padding-top: 0 !important; 295 | padding-bottom: 0 !important; 296 | border: 0 !important; 297 | transition: unset !important; 298 | opacity: 1 !important; 299 | } 300 | 301 | addon-list[type="extension"] addon-card:not([expanded="true"]) .addon.card { 302 | height: 20px !important; 303 | padding: 0 6px !important; 304 | page-break-inside: avoid !important; 305 | } 306 | 307 | addon-card:not([expanded="true"]) .addon.card:hover { 308 | background: color-mix(in srgb, White 40%, AccentColor) !important; 309 | font-weight: bold; 310 | } 311 | 312 | 313 | 314 | .addon-icon { 315 | filter: 316 | drop-shadow(1px 0 0 DarkGray) 317 | drop-shadow(-1px 0 0 DarkGray) 318 | drop-shadow(0 1px 0 DarkGray) 319 | drop-shadow(0 -1px 0 DarkGray) 320 | !important; 321 | border-radius: 15%; 322 | margin-right: 2px !important; 323 | } 324 | 325 | addon-list[type="extension"] addon-card:not([expanded="true"]) .addon-name-container 326 | { 327 | margin-top: -1px !important; 328 | } 329 | 330 | addon-list[type="extension"] .addon-name { 331 | font-size: unset !important; 332 | font-weight: unset !important; 333 | line-height: unset !important; 334 | text-overflow: unset !important; 335 | width: 100% !important; 336 | margin-inline: 2px !important; 337 | opacity: 0.9 !important; 338 | } 339 | 340 | addon-card:not([expanded="true"]) .addon-badge { 341 | height: 12px !important; 342 | width: 12px !important; 343 | margin: 0 !important; 344 | } 345 | 346 | .toggle-button { border: 1px dotted !important; } 347 | 348 | addon-card:not([expanded="true"]) .more-options-button { 349 | height: 20px !important; 350 | min-width: 16px !important; 351 | margin-left: 0 !important; 352 | border: 1px dotted !important; 353 | } 354 | 355 | addon-card:not([expanded="true"]) .theme-enable-button { 356 | border: 1px dotted !important; 357 | } 358 | 359 | 360 | 361 | addon-list[type="extension"] { 362 | counter-reset: ec 0 dc 0 tc 0; 363 | } 364 | 365 | addon-list[type="extension"] .extension-enabled-section .addon.card { 366 | counter-increment: ec tc; 367 | } 368 | 369 | addon-list[type="extension"] .extension-disabled-section .addon.card { 370 | counter-increment: dc tc; 371 | } 372 | 373 | addon-list[type="extension"]::after { 374 | content: "Total: " counter(ec) " + " counter(dc) " = " counter(tc); 375 | font-weight: bold; 376 | font-size: 1.1em; 377 | } 378 | 379 | 380 | 381 | addon-list[type="theme"] addon-card:not([expanded="true"]) .card-heading-image, 382 | addon-list[type="all"] addon-card:not([expanded="true"]) .card-heading-image 383 | { 384 | width: 150px !important; 385 | height: auto !important; 386 | min-height: 20px !important; 387 | max-height: 20px !important; 388 | margin: 0 auto 0 auto !important; 389 | padding: 0 !important; 390 | border: 1px dotted !important; 391 | } 392 | 393 | addon-list[type="theme"] addon-card:not([expanded="true"]) .addon.card, 394 | addon-list[type="all"] addon-card:not([expanded="true"]) .addon.card 395 | { 396 | padding-top: 2px !important; 397 | padding-bottom: 2px !important; 398 | page-break-inside: avoid !important; 399 | } 400 | 401 | addon-list[type="theme"] addon-card:not([expanded="true"]) .theme-enable-button 402 | { 403 | height: 20px !important; 404 | border: 1px dotted !important; 405 | } 406 | 407 | .monochromatic-addon-list[type="theme"] section { 408 | margin-top: 1em; 409 | } 410 | 411 | .monochromatic-addon-list[type="theme"] section .card.addon { 412 | height: auto !important; 413 | } 414 | 415 | .monochromatic-addon-list[type="theme"] section .addon-card-collapsed .addon-name-container 416 | { 417 | row-gap: unset !important; 418 | } 419 | 420 | addon-list[type="theme"] .theme-disabled-section h2 { 421 | column-span: all; 422 | } 423 | 424 | addon-list[type="theme"] .theme-disabled-section 425 | { 426 | column-count: 3; 427 | column-gap: 0.5em; 428 | } 429 | 430 | addon-list[type="theme"] addon-card:not([expanded="true"]) .addon-name-link 431 | { 432 | font-size: 80% !important; 433 | } 434 | 435 | } 436 | /**/ 437 | 438 | 439 | 440 | 441 | /******************************************************************************* 442 | /* ### about:addons - color add-on names 443 | /*------------------------------------------------------------------------------ 444 | /* if you want to highlight any add-on names in the list... 445 | /* - use '[addon-id="..."]' with ID from 'about:support#addons' page 446 | /* - note: prefix with '[label^="..."]' only so we know add-on name for that id 447 | /* - perhaps uncomment '@import "./userContent-my-extras.css";' near the top 448 | /* and put your selectors and colors in a file with that name 449 | /*------------------------------------------------------------------------------ 450 | /* example selectors: 451 | /* [label^="..."], [addon-id="..."], 452 | /* [label^="uBlock Origin"], [addon-id="uBlock0@raymondhill.net"], 453 | /* [label^="Name"], [addon-id="{aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa}"], 454 | /*------------------------------------------------------------------------------ 455 | /* list the selectors/addons, open about:addons, run in console (Ctrl+Shift+K): 456 | /* AddonManager.getAddonsByTypes(["extension"]).then(addons => { var list=``; addons.sort((a,b)=>{return a.name.localeCompare(b.name);}).forEach(addon => { if(!(addon.isBuiltin||addon.isSystem)){ list+=` [label^="${addon.name}"],[addon-id="${addon.id}"],[data-extensionid="${addon.id}"],[extension-id="${addon.id}"],\n`; } }); console.log(list); }); 457 | /******************************************************************************/ 458 | /**/ 459 | @-moz-document url-prefix(about:addons) { 460 | 461 | addon-list[type="extension"] addon-card:not([expanded="true"]):where( 462 | [label^="..."], [addon-id="..."] 463 | ) .addon-name-link 464 | { 465 | background: LimeGreen !important; 466 | color: Black !important; 467 | } 468 | 469 | addon-list[type="extension"] addon-card:not([expanded="true"]):where( 470 | [label^="..."], [addon-id="..."] 471 | ) .addon-name-link 472 | { 473 | background: DeepSkyBlue !important; 474 | color: Black !important; 475 | } 476 | 477 | addon-list[type="extension"] addon-card:not([expanded="true"]):where( 478 | [label^="..."], [addon-id="..."] 479 | ) .addon-name-link 480 | { 481 | background: Gold !important; 482 | color: Black !important; 483 | } 484 | 485 | addon-list[type="extension"] addon-card:not([expanded="true"]):where( 486 | [label^="..."], [addon-id="..."] 487 | ) .addon-name-link 488 | { 489 | background: DarkOrange !important; 490 | color: Black !important; 491 | } 492 | 493 | addon-list[type="extension"] addon-card:not([expanded="true"]):where( 494 | [label^="..."], [addon-id="..."] 495 | ) .addon-name-link 496 | { 497 | background: PaleVioletRed !important; 498 | color: Black !important; 499 | } 500 | 501 | addon-list[type="extension"] addon-card:not([expanded="true"]):where( 502 | [label^="..."], [addon-id="..."] 503 | ) .addon-name-link 504 | { 505 | background: Crimson !important; 506 | color: LightGray !important; 507 | } 508 | 509 | addon-list[type="extension"] addon-card:not([expanded="true"]):where( 510 | [label^="..."], [addon-id="..."] 511 | ) .addon-name-link 512 | { 513 | background: DarkGray !important; 514 | color: Black !important; 515 | } 516 | 517 | } 518 | /**/ 519 | 520 | 521 | 522 | 523 | /******************************************************************************* 524 | /* ### compact about:preferences 525 | /******************************************************************************/ 526 | /**/ 527 | @-moz-document url-prefix(about:preferences) { 528 | groupbox, checkbox, hbox, radio, label, h1, h2, button, menulist, input { 529 | padding-block: 0 !important; 530 | } 531 | groupbox, checkbox, hbox, radio, label, h1, h2, 532 | #updateBox, #doNotTrackLearnMoreBox 533 | { 534 | margin-block: 0 !important; 535 | } 536 | button, menulist { 537 | margin-top: 0 !important; 538 | min-height: 1.5em !important; 539 | height: unset !important; 540 | } 541 | h1 { 542 | flex: 1; 543 | background-color: color-mix(in srgb, White 70%, AccentColor) !important; 544 | color: color-mix(in srgb, Black 70%, AccentColor) !important; 545 | font-weight: bold !important; 546 | } 547 | h2 { 548 | flex: 1; 549 | background-color: color-mix(in srgb, White 40%, AccentColor) !important; 550 | color: color-mix(in srgb, Black 40%, AccentColor) !important; 551 | font-weight: bold !important; 552 | } 553 | } 554 | /**/ 555 | 556 | 557 | 558 | 559 | /******************************************************************************* 560 | /* ### highlight certain file names under [Browser Toolbox] [Style Editor] 561 | /*------------------------------------------------------------------------------ 562 | /* highlight file names "userChrome.css" and "userContent.css" when using: 563 | /* [Browser Toolbox] (Ctrl+Shift+Alt+I) [Developer Tools] [Style Editor] 564 | /* NOTE: this CSS rule must be set in the folder/file below: 565 | /* [FIREFOX-PROFILE-FOLDER]/chrome_debugger_profile/chrome/userContent.css 566 | /* NOTE: you must also create the file below (containing the user_pref): 567 | /* [FIREFOX-PROFILE-FOLDER]/chrome_debugger_profile/user.js 568 | /* user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); 569 | /* https://twitter.com/myfonj/status/1387584962354982912 570 | /* https://www.reddit.com/r/FirefoxCSS/comments/73dvty/tutorial_how_to_create_and_livedebug_userchromecss/ 571 | /* https://www.reddit.com/r/FirefoxCSS/comments/n91i3w/quick_way_to_find_userchromecss_in_developer_tools/ 572 | /******************************************************************************/ 573 | /**/ 574 | @-moz-document url-prefix("chrome://devtools/content/styleeditor/index.xhtml") { 575 | .splitview-nav label[value*="userChrome"], 576 | .splitview-nav label[value*="userContent"] 577 | { 578 | background-color: color-mix(in srgb, White 40%, AccentColor) !important; 579 | color: color-mix(in srgb, Black 40%, AccentColor) !important; 580 | font-weight: bold !important; 581 | } 582 | } 583 | /**/ 584 | 585 | 586 | 587 | 588 | /******************************************************************************/ 589 | -------------------------------------------------------------------------------- /firefox-style/chrome/userChrome.css: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | /* [FIREFOX-PROFILE-FOLDER]/chrome/userChrome.css 3 | /*------------------------------------------------------------------------------ 4 | /* File/Update : https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/firefox-style/chrome/userChrome.css 5 | /* Version : 2023.12.12 6 | /* License (MIT): https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/LICENSE 7 | /* Project : https://github.com/icpantsparti2/browser-bits 8 | /* Disclaimer : Use with care at your own risk 9 | /*------------------------------------------------------------------------------ 10 | /* Summary : for re-styling some elements of the firefox user interface 11 | /* (eg: tab style, tab min-size, numbered tabs, profile indicator, and more) 12 | /* (also see: https://raw.githubusercontent.com/icpantsparti2/browser-bits/main/firefox-style/chrome/userContent.css) 13 | /*------------------------------------------------------------------------------ 14 | /* 1) find your Firefox "Profile Directory" (load web page "about:support") 15 | /* eg: C:\Users\USERNAME\AppData\Roaming\Mozilla\Firefox\Profiles\XXXXXXXX.default 16 | /* eg: /home/USERNAME/.mozilla/firefox/XXXXXXXX.default 17 | /* 2) make a folder there called "chrome" 18 | /* 3) choose: 19 | /* a) move/save this file as "userChrome.css" inside the "chrome" folder 20 | /* or b) save this file as "userChrome-icpantsparti.css" in "chrome" folder 21 | /* and create/edit your "userChrome.css" adding this line near the top: 22 | /* @import "./userChrome-icpantsparti.css"; 23 | /* 4) enable/disable sections by editing the preceeding line(s) as either: /**/ /* 24 | /* 5) load web page 'about:config', or create/edit a file in the profile folder 25 | /* called "user.js" and set the following: 26 | /* user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); 27 | /* 6) close and reopen firefox 28 | /* *) to "uninstall" remove or rename the "userChrome.css" file 29 | /*------------------------------------------------------------------------------ 30 | /* Notes: 31 | /* * This is a collection of userChrome.css code snippets 32 | /* * #id and .class names are by Mozilla from Firefox CSS structure 33 | /* * CSS selectors can change between Firefox versions without notice/support 34 | /*------------------------------------------------------------------------------ 35 | /* Useful links (in no particular order): 36 | /* https://www.reddit.com/r/FirefoxCSS/wiki/index/tutorials 37 | /* https://firefox-source-docs.mozilla.org/devtools-user/browser_toolbox/index.html 38 | /* (as above: https://developer.mozilla.org/docs/Tools/Browser_Toolbox) 39 | /* https://www.reddit.com/r/FirefoxCSS 40 | /* https://www.reddit.com/r/firefox 41 | /* https://www.mozilla.org 42 | /* https://www.userchrome.org/ 43 | /* https://github.com/MrOtherGuy/firefox-csshacks 44 | /* https://github.com/Aris-t2/CustomCSSforFx (Classic Theme Restorer) 45 | /* https://github.com/Timvde/UserChrome-Tweaks (dormant/archived) 46 | /* https://github.com/GrosBourrin/UserChrome-Tweaks 47 | /* https://www.reddit.com/r/FirefoxCSS/comments/14cmitl/is_it_possible_to_edit_the_ui_of_the_browser/ 48 | /* (how to change the UI of the browser toolbox) 49 | /*------------------------------------------------------------------------------ 50 | /* Some Example Firefox CSS "Themes" links (in no particular order): 51 | /* https://firefoxcss-store.github.io/ (<- lots more CSS "Themes" here) 52 | /* (repo of above: https://github.com/FirefoxCSS-Store/FirefoxCSS-Store.github.io) 53 | /* https://github.com/black7375/Firefox-UI-Fix (Lepton/Proton Fix) 54 | /* https://github.com/black7375/Firefox-UI-Fix/tree/photon-style 55 | /* https://github.com/muckSponge/MaterialFox 56 | /* https://github.com/QNetITQ/WaveFox 57 | /* https://github.com/wilfredwee/photon-australis 58 | /* https://github.com/intrnl/firefox-revert-proton (dormant/archived) 59 | /* https://github.com/overdodactyl/ShadowFox (dormant?) 60 | /*------------------------------------------------------------------------------ 61 | /* Other Notes: 62 | /* FF103: -moz-accent-color -moz-accent-color-foreground now: AccentColor AccentColorText 63 | /* https://www.reddit.com/r/FirefoxCSS/comments/w9t89v/tab_bar_windows_accent_color_in_firefox_103/ 64 | /*------------------------------------------------------------------------------ 65 | /* Acknowledgments: thanks to the links shown for useful info 66 | /******************************************************************************/ 67 | 68 | 69 | 70 | 71 | /******************************************************************************* 72 | /* The sections in the code below are: 73 | /* optionally import other "userChrome-____.css" files 74 | /* main (the following are enabled - comment out any not required) 75 | /* tab bar : hide the space before the window control buttons 76 | /* tabs : minimum tab size 77 | /* tabs : move "Close Tab" options to the top of context menu 78 | /* tabs : reduce favicon padding 79 | /* tabs : always show a favicon 80 | /* tabs : numbered tabs (and "List all tabs" panel) 81 | /* tabs : remove tab padding, curved border, and shadow 82 | /* tabs : indicate: pending (unloaded), multi-selected, selected (current) 83 | /* tabs : show audio icon above favicon 84 | /* url box : rounded corners 85 | /* url box : bookmark panel : hide preview and show URL and keyword boxes 86 | /* sidebar : unrestricted sidebar width 87 | /* toolbar : compact buttons 88 | /* toolbar : force display of the full toolbar even in popup windows 89 | /* toolbar : replace 'extensions/overflow/menu' button icons 90 | /* toolbar+contextmenus : add outline to tab favicons and add-on icons 91 | /* toolbar : overflow button panel - compact/columns 92 | /* toolbar : unified extensions button panel - compact/columns 93 | /* findbar : remove the animation 94 | /* tab bar : hide "Private browsing" text label 95 | /* tab bar : show a profile indicator (color/text label) (see notes) 96 | /* other (the following are disabled - uncomment any required) 97 | /* toolbar : unified extensions button panel - color add-on names 98 | /* tabs : no text fade out (on the right edge) 99 | /* tabs : hide tab close buttons 100 | /* url box : enforce minimum width 101 | /* url box : hide container symbol 102 | /* url box : hide bookmark button 103 | /* tab bar : hide until nav area hovered 104 | /* tab bar : hide "List all tabs" button 105 | /******************************************************************************/ 106 | 107 | 108 | 109 | 110 | /******************************************************************************* 111 | /* ### optionally import other "userChrome-____.css" files 112 | /*------------------------------------------------------------------------------ 113 | /* (any imports must be here at the top) 114 | /******************************************************************************/ 115 | /**/ @import "./userChrome-my-extras.css"; /**/ 116 | 117 | 118 | 119 | 120 | /******************************************************************************* 121 | /* ### main (the following are enabled - comment out any not required) 122 | /*------------------------------------------------------------------------------ 123 | /* enable/disable by editing preceeding line(s) as either: /**/ /* 124 | /******************************************************************************/ 125 | 126 | 127 | 128 | 129 | /******************************************************************************* 130 | /* ### tab bar : hide the space before the window control buttons 131 | /*------------------------------------------------------------------------------ 132 | /* the spacer before Minimize/Maximize/Restore/Close buttons 133 | /* seen when 'about:config' user_pref("browser.tabs.inTitlebar", 1); 134 | /* https://www.reddit.com/r/FirefoxCSS/comments/x70pcs/removing_unused_space_between_new_tablist_all/ 135 | /******************************************************************************/ 136 | /**/ 137 | .titlebar-spacer[type="post-tabs"] { display: none; } 138 | /**/ 139 | 140 | 141 | 142 | 143 | /******************************************************************************* 144 | /* ### tabs : minimum tab size 145 | /*------------------------------------------------------------------------------ 146 | /* prevent tab overflow for longer (as more tabs opened their size reduces) 147 | /* tip: also enable: "hide tab close buttons" "List all tabs" and "numbered tabs" 148 | /* https://github.com/Timvde/UserChrome-Tweaks/blob/master/tabs/prevent-tab-overflow.css 149 | /* https://www.reddit.com/r/FirefoxCSS/comments/p3mfg8/fixing_tabs_in_the_newest_version_of_ff_first/ 150 | /* notes: 151 | /* clip-width: 1.5em !important; 152 | /* if you want minimum tab size for selected tab: 153 | /* https://www.reddit.com/r/FirefoxCSS/comments/xoopet/like_many_others_im_wanting_to_make_the_move_from/ 154 | /* .tabbrowser-tab[fadein][selected]:not([pinned]){min-width: 4em !important;} 155 | /******************************************************************************/ 156 | /**/ 157 | .tabbrowser-tab[fadein]:not([pinned]) { 158 | min-width: 1.5em !important; 159 | } 160 | /**/ 161 | 162 | 163 | 164 | 165 | /******************************************************************************* 166 | /* ### tabs : move "Close Tab" options to the top of context menu 167 | /*------------------------------------------------------------------------------ 168 | /* why: for easier tab closing from tab right click content menu 169 | /* eg: hold down right click and release on "Close Tab" 170 | /* https://www.reddit.com/r/FirefoxCSS/comments/9la2ps/how_i_can_change_order_of_the_items_in_right/ 171 | /******************************************************************************/ 172 | /**/ 173 | #tabContextMenu #context_closeTab { -moz-box-ordinal-group:0; order:0; } 174 | #tabContextMenu #context_closeTabsToTheEnd { -moz-box-ordinal-group:0; order:0; } 175 | /**/ 176 | 177 | 178 | 179 | 180 | /******************************************************************************* 181 | /* ### tabs : reduce favicon padding 182 | /*------------------------------------------------------------------------------ 183 | /* https://www.reddit.com/r/FirefoxCSS/comments/7dfnhv/how_to_remove_empty_space_around_favicon_so_more/ 184 | /* https://www.reddit.com/r/FirefoxCSS/comments/7orkrw/tabs_change_favicon_into_close_button_on_hover/ 185 | /* notes: 186 | /* transform: scale(0.8, 0.8) !important; 187 | /******************************************************************************/ 188 | /**/ 189 | .tabbrowser-tab .tab-icon-image, 190 | .tabbrowser-tab .tab-throbber, 191 | .tabbrowser-tab .tab-sharing-icon-overlay, 192 | .tabbrowser-tab .tab-icon-overlay 193 | { 194 | margin-left: 0px !important; 195 | margin-right: 0px !important; 196 | margin-inline-end: 0px !important; 197 | padding-left: 0px !important; 198 | padding-right: 0px !important; 199 | } 200 | /**/ 201 | 202 | 203 | 204 | 205 | /******************************************************************************* 206 | /* ### tabs : always show a favicon 207 | /*------------------------------------------------------------------------------ 208 | /* eg default icon when none/loading 209 | /******************************************************************************/ 210 | /**/ 211 | .tab-icon-image { display: block !important; } 212 | /**/ 213 | 214 | 215 | 216 | 217 | /******************************************************************************* 218 | /* ### tabs : numbered tabs (and "List all tabs" panel) 219 | /*------------------------------------------------------------------------------ 220 | /* White on Black, OrangeRed (active tab), Gray (pending/unloaded) 221 | /* https://www.reddit.com/r/FirefoxCSS/comments/8ruy2d/numbered_tabs_revisited/ 222 | /* NOTE: pinned tabs are numbered (matches tab switching with Alt+1 ... Alt+8) 223 | /* however the panel for "List all tabs" button does not list pinned tabs 224 | /* unless 'about:config' "browser.tabs.tabmanager.enabled" is set to true 225 | /* so if that pref is false we show wavy line-through on those numberings 226 | /* notes: 227 | /* FF107+ #allTabsMenu-allTabsViewTabs becomes #allTabsMenu-allTabsView-tabs 228 | /* FF116+ now uses .all-tabs-button.subviewbutton::before for container color 229 | /* not using as we want pinned tabs numbered too: 230 | /* #tabbrowser-tabs .tabbrowser-tab:not([pinned]) .tab-content::before 231 | /*------------------------------------------------------------------------------ 232 | /* notes: 233 | /* if you wanted tab count on "List all tabs" button see: 234 | /* https://www.reddit.com/r/FirefoxCSS/comments/s4wsww/show_the_number_of_open_tabs_on_the_list_all_tabs/ 235 | /******************************************************************************/ 236 | /**/ 237 | #tabbrowser-tabs, #allTabsMenu-allTabsViewTabs, #allTabsMenu-allTabsView-tabs 238 | { counter-reset: n_tabs 0; } 239 | 240 | .tabbrowser-tab .tab-content::before, 241 | #allTabsMenu-allTabsViewTabs .all-tabs-button.subviewbutton::before, 242 | #allTabsMenu-allTabsView-tabs .all-tabs-button.subviewbutton::after 243 | { 244 | display: inline-block; 245 | font-weight: bold !important; 246 | margin-right: 0px !important; 247 | background-color: Black !important; 248 | color: White !important; 249 | } 250 | 251 | #allTabsMenu-allTabsViewTabs .all-tabs-button.subviewbutton::before, 252 | #allTabsMenu-allTabsView-tabs .all-tabs-button.subviewbutton::after 253 | { 254 | margin-right: 4px !important; 255 | text-decoration: line-through wavy !important; 256 | } 257 | 258 | .tabbrowser-tab[pending] .tab-content::before, 259 | #allTabsMenu-allTabsViewTabs .all-tabs-item[pending] .all-tabs-button.subviewbutton::before, 260 | #allTabsMenu-allTabsView-tabs .all-tabs-item[pending] .all-tabs-button.subviewbutton::after 261 | { 262 | background-color: DarkGray !important; 263 | color: Black !important; 264 | } 265 | 266 | .tabbrowser-tab[selected=true] .tab-content::before, 267 | #allTabsMenu-allTabsViewTabs .all-tabs-item[selected=true] .all-tabs-button.subviewbutton::before, 268 | #allTabsMenu-allTabsView-tabs .all-tabs-item[selected=true] .all-tabs-button.subviewbutton::after 269 | { 270 | background-color: OrangeRed !important; 271 | } 272 | 273 | .tabbrowser-tab .tab-content::before 274 | { 275 | margin-left: 1px !important; 276 | font-size: 80% !important; 277 | line-height: 85%; 278 | max-width: 0.6em !important; 279 | word-break: break-all; 280 | } 281 | 282 | #tabbrowser-tabs .tabbrowser-tab .tab-content::before 283 | { 284 | counter-increment: n_tabs; 285 | content:counter(n_tabs); 286 | } 287 | 288 | #allTabsMenu-allTabsViewTabs .all-tabs-button.subviewbutton::before, 289 | #allTabsMenu-allTabsView-tabs .all-tabs-button.subviewbutton::after 290 | { 291 | counter-increment: n_tabs; 292 | content:"\00A0" counter(n_tabs) "\00A0"; 293 | } 294 | 295 | @supports -moz-bool-pref("browser.tabs.tabmanager.enabled") { 296 | #allTabsMenu-allTabsViewTabs .all-tabs-button.subviewbutton::before, 297 | #allTabsMenu-allTabsView-tabs .all-tabs-button.subviewbutton::after 298 | { 299 | text-decoration: unset !important; 300 | } 301 | } 302 | 303 | @media (-moz-bool-pref:"browser.tabs.tabmanager.enabled") { 304 | #allTabsMenu-allTabsViewTabs .all-tabs-button.subviewbutton::before, 305 | #allTabsMenu-allTabsView-tabs .all-tabs-button.subviewbutton::after 306 | { 307 | text-decoration: unset !important; 308 | } 309 | } 310 | /**/ 311 | 312 | 313 | 314 | 315 | /******************************************************************************* 316 | /* ### tabs : remove tab padding, curved border, and shadow 317 | /*------------------------------------------------------------------------------ 318 | /* https://www.reddit.com/r/firefox/comments/mxgba3/dont_like_proton_designs_tab_style_add_this_to/ 319 | /* https://gist.github.com/Speedy37/63d37931601123178ac2221533292cdd 320 | /* https://www.reddit.com/r/FirefoxCSS/comments/mviznn/so_i_just_got_inflincted_the_new_ui_can_anyone/ 321 | /* https://github.com/intrnl/firefox-revert-proton 322 | /* https://github.com/ShatteredIcicle/firefox-ui-regression-mending/blob/master/chrome/photon-tabs.css 323 | /******************************************************************************/ 324 | /**/ 325 | #TabsToolbar { 326 | --lwt-tab-line-color: reset !important; 327 | } 328 | .tabbrowser-tab .tab-content { 329 | margin-left: 0px !important; 330 | margin-right: 0px !important; 331 | padding-left: 0px !important; 332 | padding-right: 0px !important; 333 | } 334 | #TabsToolbar .tabbrowser-tab { 335 | padding-inline: unset !important; 336 | } 337 | #TabsToolbar .tabbrowser-tab .tab-background { 338 | border-radius: unset !important; 339 | box-shadow: none !important; 340 | } 341 | /**/ 342 | 343 | 344 | 345 | 346 | /******************************************************************************* 347 | /* ### tabs : indicate: pending (unloaded), multi-selected, selected (current) 348 | /*------------------------------------------------------------------------------ 349 | /* notes: 350 | /* @-moz-document url(chrome://browser/content/browser.xhtml) { } 351 | /* AccentColor eg #0078D7 AccentColorText --toolbar-bgcolor --tabpanel-background-color --tab-selected-bgcolor 352 | /* background-image: radial-gradient(transparent,#D3D3D3) !important; 353 | /* box-shadow: 0px 0px 5px var(--identity-icon-color) inset !important; 354 | /* background-image: radial-gradient(transparent,transparent,var(--identity-icon-color,#fff)) !important; 355 | /* font-weight: bold !important; 356 | /* FF119 broken on dark/light theme: --focus-outline-color 357 | /******************************************************************************/ 358 | /**/ 359 | #TabsToolbar .tabbrowser-tab[pending] .tab-text { 360 | text-decoration: line-through !important; 361 | } 362 | #TabsToolbar .tabbrowser-tab[multiselected="true"] .tab-background { 363 | border-bottom: 3px dotted var(--color-accent-primary) !important; 364 | } 365 | #TabsToolbar .tab-background[multiselected="true"] { 366 | outline: unset !important; 367 | } 368 | #TabsToolbar .tabbrowser-tab[selected=true] .tab-background { 369 | box-shadow: none !important; 370 | border-bottom: 3px solid var(--color-accent-primary) !important; 371 | } 372 | /**/ 373 | 374 | /* underline name (title) on selected/active tabs */ 375 | /* 376 | #TabsToolbar .tabbrowser-tab[multiselected="true"] .tab-text { 377 | text-decoration: underline 2px !important; 378 | } 379 | #TabsToolbar .tabbrowser-tab[selected=true] .tab-text { 380 | text-decoration: underline wavy !important; 381 | } 382 | /**/ 383 | 384 | 385 | 386 | 387 | /******************************************************************************* 388 | /* ### tabs : show audio icon above favicon 389 | /*------------------------------------------------------------------------------ 390 | /* (speaker icon/mute for tabs with audio) 391 | /* https://www.reddit.com/r/FirefoxCSS/comments/msg30g/how_to_show_speaker_icon_next_to_the_favicon/ 392 | /* https://github.com/MrOtherGuy/firefox-csshacks/blob/master/chrome/inline_tab_audio_icons.css 393 | /* https://github.com/MrOtherGuy/firefox-csshacks/blob/master/chrome/overlay_tab_audio_icons.css 394 | /* https://www.reddit.com/r/FirefoxCSS/comments/nsx39v/audio_icon/ 395 | /* notes: 396 | /* previously (tabs : show audio icon next to favicon): 397 | /* .tab-icon-stack:is([muted],[soundplaying],[activemedia-blocked]) { grid-template-areas: "a s";} 398 | /* .tab-icon-overlay:is([muted],[soundplaying],[activemedia-blocked]) { grid-area: s; } 399 | /* .tab-icon-overlay, .tab-icon-image { opacity: 1 !important; } 400 | /* notes: 401 | /* .tab-secondary-label { display: none } 402 | /* .tab-secondary-label:is([soundplaying], [muted], 403 | /* [activemedia-blocked], [pictureinpicture], [sharing]) 404 | /* { display: none !important; } 405 | /******************************************************************************/ 406 | /**/ 407 | .tab-icon-overlay:is([soundplaying], [muted], 408 | [activemedia-blocked], [pictureinpicture], [sharing], :not([pinned])) { 409 | opacity: 1 !important; 410 | bottom: 12px !important; 411 | padding: 0px !important; 412 | fill-opacity: 1 !important; 413 | } 414 | 415 | .tab-icon-overlay[soundplaying] { fill: Lime !important; } 416 | 417 | .tab-icon-overlay[muted] { fill: Pink !important; } 418 | 419 | .tab-icon-overlay:is([pinned], [sharing]):not([crashed]) { 420 | opacity: 1 !important; 421 | margin-top: -7px !important; 422 | padding: 0px !important; 423 | stroke: none !important; 424 | fill-opacity: 1 !important; 425 | } 426 | 427 | #TabsToolbar .tab-icon-image { opacity: 1 !important; } 428 | /**/ 429 | 430 | 431 | 432 | 433 | /******************************************************************************* 434 | /* ### url box : rounded corners 435 | /*------------------------------------------------------------------------------ 436 | /* https://www.reddit.com/r/FirefoxCSS/comments/hzm32k/does_anyone_know_how_to_get_rounded_corners_on/ 437 | /******************************************************************************/ 438 | /**/ 439 | #urlbar-background { 440 | border-radius: 12px !important; 441 | border: 1px solid color-mix(in srgb, currentColor 40%, transparent) !important; 442 | } 443 | #identity-icon-box { 444 | border-radius: 12px 0 0 12px !important; 445 | } 446 | /**/ 447 | 448 | 449 | 450 | 451 | /******************************************************************************* 452 | /* ### url box : bookmark panel : hide preview and show URL and keyword boxes 453 | /*------------------------------------------------------------------------------ 454 | /* https://www.reddit.com/r/FirefoxCSS/comments/104xehv/no_longer_displaying_url_field_in_the_edit_this/ 455 | /******************************************************************************/ 456 | /**/ 457 | #editBookmarkPanel #editBMPanel_locationRow, 458 | #editBookmarkPanel .editBMPanel_locationRow, 459 | #editBookmarkPanel .editBMPanel_keywordRow 460 | { 461 | visibility: visible !important; 462 | display: block !important; 463 | } 464 | #editBookmarkPanel #editBMPanel_locationField { 465 | min-width: 80% !important; 466 | } 467 | #editBookmarkPanel #editBookmarkPanelImage, 468 | #editBookmarkPanel #editBookmarkSeparator { 469 | display: none !important; 470 | } 471 | /**/ 472 | 473 | 474 | 475 | 476 | /******************************************************************************* 477 | /* ### sidebar : unrestricted sidebar width 478 | /*------------------------------------------------------------------------------ 479 | /* https://github.com/Aris-t2/CustomCSSforFx/blob/master/classic/css/generalui/sidebar_width_unrestricted.css 480 | /******************************************************************************/ 481 | /**/ 482 | #sidebar, #sidebar-header, #sidebar-box { 483 | overflow: hidden !important; 484 | min-width: 0px !important; 485 | max-width: 100vw !important; 486 | } 487 | /**/ 488 | 489 | 490 | 491 | 492 | /******************************************************************************* 493 | /* ### toolbar : compact buttons 494 | /******************************************************************************/ 495 | /**/ 496 | #PanelUI-menu-button, 497 | #nav-bar-overflow-button, 498 | #unified-extensions-button, 499 | #navigator-toolbox .chromeclass-toolbar-additional 500 | { 501 | padding-right: 0 !important; 502 | padding-left: 0 !important; 503 | margin-left: -2px !important; 504 | margin-right: -2px !important; 505 | } 506 | /**/ 507 | 508 | 509 | 510 | 511 | /******************************************************************************* 512 | /* ### toolbar : force display of the full toolbar even in popup windows 513 | /*------------------------------------------------------------------------------ 514 | /* Override Hiding of Toolbar Buttons in Limited Feature Windows 515 | /* https://www.reddit.com/r/firefox/comments/z9f804/is_there_a_way_to_show_addons_in_popup_windows/ 516 | /* https://www.userchrome.org/how-create-userchrome-css.html 517 | /* https://www.jeffersonscher.com/res/popit.html 518 | /* notes: 519 | /* default is display: none 520 | /******************************************************************************/ 521 | /**/ 522 | *|*:root[chromehidden~="toolbar"] .chromeclass-toolbar-additional { 523 | display: flex !important; 524 | } 525 | /**/ 526 | 527 | 528 | 529 | 530 | /******************************************************************************* 531 | /* ### toolbar : replace 'extensions/overflow/menu' button icons 532 | /*------------------------------------------------------------------------------ 533 | /* swap the icons to look like: [v] [>] [...] 534 | /* https://www.reddit.com/r/FirefoxCSS/comments/7er388/change_icon_of_the_hamburger_menu/ 535 | /* https://www.reddit.com/r/FirefoxCSS/comments/11raf60/text_in_unified_extensions_menu_is_not_aligned/ 536 | /* notes: 537 | /* chrome://branding/content/icon32.png 538 | /* chrome://global/skin/icons/chevron.svg 539 | /******************************************************************************/ 540 | #unified-extensions-button .toolbarbutton-icon { 541 | list-style-image: url("chrome://global/skin/icons/sort-arrow.svg") !important; 542 | } 543 | #nav-bar-overflow-button .toolbarbutton-icon { 544 | list-style-image: url("chrome://global/skin/icons/arrow-right-12.svg") !important; 545 | } 546 | #PanelUI-menu-button .toolbarbutton-icon { 547 | list-style-image: url("chrome://global/skin/icons/more.svg") !important; 548 | } 549 | 550 | 551 | 552 | 553 | /******************************************************************************* 554 | /* ### toolbar+contextmenus : add outline to tab favicons and add-on icons 555 | /*------------------------------------------------------------------------------ 556 | /* if you are using a dark theme helps some favicons to show (eg github.com) 557 | /* https://www.reddit.com/r/FirefoxCSS/comments/sda1sx/favicon_background_for_dark_themes/ 558 | /* https://www.reddit.com/r/FirefoxCSS/comments/f7jr79/background_tabs_greyscale_icon_foreground_hovered/ 559 | /* https://www.reddit.com/r/FirefoxCSS/comments/yx9fly/any_way_to_change_the_extension_icon_colour_would/ 560 | /* /*border-radius: 15%;*/ 561 | /******************************************************************************/ 562 | /**/ 563 | .tab-icon-image, 564 | .webextension-browser-action .toolbarbutton-icon, 565 | .unified-extensions-item-icon, 566 | #contentAreaContextMenu :where([image^="moz-extension:"]) .menu-iconic-icon, 567 | #tabContextMenu :where([image^="moz-extension:"]) .menu-iconic-icon 568 | { 569 | filter: 570 | drop-shadow(1px 0 0 DarkGray) 571 | drop-shadow(-1px 0 0 DarkGray) 572 | drop-shadow(0 1px 0 DarkGray) 573 | drop-shadow(0 -1px 0 DarkGray) 574 | !important; 575 | } 576 | /**/ 577 | 578 | 579 | 580 | 581 | /******************************************************************************* 582 | /* ### toolbar : overflow button panel - compact/columns 583 | /*------------------------------------------------------------------------------ 584 | /* and icon only for cut/copy/paste buttons 585 | /* https://www.reddit.com/r/FirefoxCSS/comments/y1p88c/how_can_i_only_show_extension_icons_in_a_grid/ 586 | /* notes: 587 | /* display: grid; grid-template-columns: repeat(3, 1fr); 588 | /******************************************************************************/ 589 | /**/ 590 | #widget-overflow-list, 591 | #widget-overflow-fixed-list 592 | { 593 | display: block; 594 | column-gap: 0; 595 | column-count: 2; 596 | } 597 | #widget-overflow #edit-controls .toolbarbutton-text { 598 | display: none !important; 599 | } 600 | /**/ 601 | 602 | 603 | 604 | 605 | /******************************************************************************* 606 | /* ### toolbar : unified extensions button panel - compact/columns 607 | /*------------------------------------------------------------------------------ 608 | /* the "jigsaw puzzle piece" Extensions button (FF109 onwards) 609 | /* the panel is for notifying/controlling manifest v3 extension permissions 610 | /* https://blog.mozilla.org/addons/2022/11/17/unified-extensions-button-and-how-to-handle-permissions-in-manifest-v3/ 611 | /* https://addons.mozilla.org/firefox/addon/a-test-extension/ 612 | /* https://www.reddit.com/r/FirefoxCSS/comments/10exwv7/anyone_know_how_to_change_the_scale_of_the/ 613 | /* https://www.reddit.com/r/FirefoxCSS/comments/10exwv7/anyone_know_how_to_change_the_scale_of_the/j4v67wj/ 614 | /* https://www.reddit.com/r/FirefoxCSS/comments/10fl39n/made_these_two_different_styles_for_people_who/ 615 | /* https://github.com/MrOtherGuy/firefox-csshacks/blob/master/chrome/compact_extensions_panel.css 616 | /* https://www.reddit.com/r/FirefoxCSS/comments/150kcjg/move_extensions_button_right_of_pinned_extensions/ 617 | /*------------------------------------------------------------------------------ 618 | /* notes: 619 | /* - when Mozilla further develops the unified extensions panel, this code 620 | /* will need reviewing to ensure it does not inhibit the ui/function 621 | /* - also see section below for coloring add-on names 622 | /* - to change icon order (until Firefox UI develops), see/use: 623 | /* https://github.com/icpantsparti2/browser-bits/blob/main/javascript/firefox-v109-change-order-under-extensions-button.js 624 | /*------------------------------------------------------------------------------ 625 | /* --menu-panel-width: 22.35em; 626 | /* --menu-panel-width-wide: 29em; 627 | /******************************************************************************/ 628 | /**/ 629 | #unified-extensions-view { 630 | width: unset !important; 631 | } 632 | 633 | #overflowed-extensions-list, 634 | #unified-extensions-area, 635 | .unified-extensions-list 636 | { 637 | margin-inline: var(--panel-separator-margin) !important; 638 | display: block !important; 639 | column-gap: 0 !important; 640 | column-count: 2 !important; 641 | } 642 | 643 | 644 | #unified-extensions-view .panel-header, 645 | #unified-extensions-view toolbarseparator 646 | { 647 | display: none !important; 648 | } 649 | 650 | #unified-extensions-panel #unified-extensions-view, 651 | #unified-extensions-manage-extensions 652 | { 653 | margin-top: 4px !important; 654 | } 655 | 656 | #unified-extensions-panel vbox#overflowed-extensions-list:not(:empty), 657 | #unified-extensions-panel vbox#unified-extensions-area:not(:empty), 658 | #unified-extensions-panel vbox.unified-extensions-list:not(:empty) 659 | { 660 | border-bottom: 1px solid color-mix(in srgb, currentColor 40%, transparent); 661 | } 662 | 663 | 664 | #overflowed-extensions-list .toolbarbutton-icon, 665 | #unified-extensions-panel .toolbarbutton-icon, 666 | .unified-extensions-item-icon 667 | { 668 | --uei-icon-size: 16px; 669 | } 670 | 671 | #unified-extensions-panel .subviewbutton { 672 | padding: 2px !important; 673 | } 674 | 675 | #unified-extensions-view > vbox > vbox > .unified-extensions-item { 676 | padding-block: 0px !important; 677 | margin-block: 0px !important; 678 | } 679 | 680 | #unified-extensions-view .unified-extensions-item-menu-button { 681 | margin-inline-end: 0 !important; 682 | } 683 | 684 | #unified-extensions-view .toolbarbutton-icon { 685 | padding: 0 !important; 686 | } 687 | 688 | .unified-extensions-list .unified-extensions-item-menu-button { 689 | margin-inline-end: 8px !important; 690 | } 691 | 692 | .unified-extensions-item-contents { 693 | line-height: 1 !important; 694 | white-space: nowrap !important; 695 | } 696 | 697 | 698 | .unified-extensions-item-name { 699 | font-size: 80% !important; } 700 | 701 | .unified-extensions-item-message { 702 | font-size: 75% !important; } 703 | 704 | #unified-extensions-view .unified-extensions-item-menu-button.subviewbutton:not(:hover) 705 | { 706 | opacity: 0.2 !important; 707 | } 708 | 709 | #unified-extensions-panel 710 | :where(toolbaritem,unified-extensions-item)[attention] 711 | .unified-extensions-item-action-button 712 | { 713 | box-shadow: 714 | 1px 1px var(--uei-button-attention-dot-color) inset, 715 | -1px -1px var(--uei-button-attention-dot-color) inset !important; 716 | } 717 | /**/ 718 | 719 | /* keep button to the right of pinned extension buttons */ 720 | /**/ 721 | #unified-extensions-button { order: 1 !important; } 722 | /**/ 723 | 724 | /* to style disabled extension buttons */ 725 | /* 726 | #unified-extensions-panel 727 | :where(toolbaritem,unified-extensions-item) 728 | .unified-extensions-item-action-button[disabled] 729 | { } 730 | /**/ 731 | 732 | /* to hide the gear icons */ 733 | /* 734 | #unified-extensions-view .unified-extensions-item-menu-button.subviewbutton 735 | { display: none !important; } 736 | /**/ 737 | 738 | /* to hide the button text (not advised) */ 739 | /* 740 | #unified-extensions-view .unified-extensions-item-action-button .unified-extensions-item-contents 741 | { width: 0 !important; visibility: hidden !important; } 742 | /**/ 743 | 744 | 745 | 746 | 747 | /******************************************************************************* 748 | /* ### findbar : remove the animation 749 | /*------------------------------------------------------------------------------ 750 | /* https://www.reddit.com/r/firefox/comments/11m8eyt/ctrlf_search_bar_appearing_animation_can_i_turn/ 751 | /******************************************************************************/ 752 | /**/ 753 | findbar { 754 | transition-property: unset !important; 755 | transition-duration: unset !important; 756 | transition-timing-function: unset !important; 757 | } 758 | /**/ 759 | 760 | 761 | 762 | 763 | /******************************************************************************* 764 | /* ### tab bar : hide "Private browsing" text label 765 | /*------------------------------------------------------------------------------ 766 | /* https://www.reddit.com/r/firefox/comments/16sri14/1190b1_how_to_remove_this_private_browsing/k2b7nrf/ 767 | /* FF119 instead of: "browser.privatebrowsing.enable-new-indicator", false 768 | /******************************************************************************/ 769 | /**/ 770 | #private-browsing-indicator-with-label > label { 771 | display: none; 772 | } 773 | /**/ 774 | 775 | 776 | 777 | 778 | /******************************************************************************* 779 | /* ### tab bar : show a profile indicator (color/text label) (see notes) 780 | /*------------------------------------------------------------------------------ 781 | /* shows on the right edge of the tab bar (useful for multiple profiles) 782 | /* notes: this does not show unless configured, set your own names/colors 783 | /* set a preference in 'about:config' to trigger which id is shown eg 784 | /* user_pref("_profile_0", true); in first profile 785 | /* user_pref("_profile_1", true); in next profile etc 786 | /* also see: "optional: for compact profile indicator (sideways text)" 787 | /* for multiple spaces in --id-txt use multiple \00A0 (non breaking spaces) 788 | /* FF120? @supports -moz-bool-pref("...") becomes @media (-moz-bool-pref:"...") 789 | /******************************************************************************/ 790 | /**/ 791 | @supports -moz-bool-pref("_profile_0") { 792 | #navigator-toolbox { --id-txt:"0"; --id-fg:Black; --id-bg:DarkOrange; } } 793 | @media (-moz-bool-pref:"_profile_0") { 794 | #navigator-toolbox { --id-txt:"0"; --id-fg:Black; --id-bg:DarkOrange; } } 795 | 796 | @supports -moz-bool-pref("_profile_1") { 797 | #navigator-toolbox { --id-txt:"1"; --id-fg:Black; --id-bg:LightSeaGreen; } } 798 | @media (-moz-bool-pref:"_profile_1") { 799 | #navigator-toolbox { --id-txt:"1"; --id-fg:Black; --id-bg:LightSeaGreen; } } 800 | 801 | @supports -moz-bool-pref("_profile_2") { 802 | #navigator-toolbox { --id-txt:"2"; --id-fg:Black; --id-bg:BurlyWood; } } 803 | @media (-moz-bool-pref:"_profile_2") { 804 | #navigator-toolbox { --id-txt:"2"; --id-fg:Black; --id-bg:BurlyWood; } } 805 | 806 | @supports -moz-bool-pref("_profile_3") { 807 | #navigator-toolbox { --id-txt:"3"; --id-fg:Black; --id-bg:Yellow; } } 808 | @media (-moz-bool-pref:"_profile_3") { 809 | #navigator-toolbox { --id-txt:"3"; --id-fg:Black; --id-bg:Yellow; } } 810 | 811 | @supports -moz-bool-pref("_profile_4") { 812 | #navigator-toolbox { --id-txt:"4"; --id-fg:Black; --id-bg:HotPink; } } 813 | @media (-moz-bool-pref:"_profile_4") { 814 | #navigator-toolbox { --id-txt:"4"; --id-fg:Black; --id-bg:HotPink; } } 815 | 816 | @supports -moz-bool-pref("_profile_5") { 817 | #navigator-toolbox { --id-txt:"5"; --id-fg:White; --id-bg:Red; } } 818 | @media (-moz-bool-pref:"_profile_5") { 819 | #navigator-toolbox { --id-txt:"5"; --id-fg:White; --id-bg:Red; } } 820 | 821 | @supports -moz-bool-pref("_profile_6") { 822 | #navigator-toolbox { --id-txt:"6"; --id-fg:White; --id-bg:Black; } } 823 | @media (-moz-bool-pref:"_profile_6") { 824 | #navigator-toolbox { --id-txt:"6"; --id-fg:White; --id-bg:Black; } } 825 | 826 | @supports -moz-bool-pref("_profile_e") { 827 | #navigator-toolbox { --id-txt:"ESR"; --id-fg:Black; --id-bg:DarkOrange; } } 828 | @media (-moz-bool-pref:"_profile_e") { 829 | #navigator-toolbox { --id-txt:"ESR"; --id-fg:Black; --id-bg:DarkOrange; } } 830 | 831 | @supports -moz-bool-pref("_profile_b") { 832 | #navigator-toolbox { --id-txt:"Beta"; --id-fg:Black; --id-bg:SkyBlue; } } 833 | @media (-moz-bool-pref:"_profile_b") { 834 | #navigator-toolbox { --id-txt:"Beta"; --id-fg:Black; --id-bg:SkyBlue; } } 835 | 836 | @supports -moz-bool-pref("_profile_d") { 837 | #navigator-toolbox { --id-txt:"Dev"; --id-fg:White; --id-bg:DodgerBlue; } } 838 | @media (-moz-bool-pref:"_profile_d") { 839 | #navigator-toolbox { --id-txt:"Dev"; --id-fg:White; --id-bg:DodgerBlue; } } 840 | 841 | @supports -moz-bool-pref("_profile_a") { 842 | #navigator-toolbox { --id-txt:"Alpha"; --id-fg:White; --id-bg:MediumPurple; } } 843 | @media (-moz-bool-pref:"_profile_a") { 844 | #navigator-toolbox { --id-txt:"Alpha"; --id-fg:White; --id-bg:MediumPurple; } } 845 | 846 | #TabsToolbar::after { 847 | display:flex; 848 | flex-grow:0 !important; 849 | height:var(--tab-min-height,3.5em); 850 | padding:2px !important; 851 | justify-content:center; 852 | align-items:center; 853 | word-break:break-all; 854 | overflow:hidden; 855 | font-weight:bold; 856 | text-shadow:none; 857 | color:var(--id-fg,Black); 858 | background-color:var(--id-bg,LightGray); 859 | content:var(--id-txt); 860 | } 861 | /**/ 862 | 863 | /* optional: for compact profile indicator (sideways text) */ 864 | /* 865 | #TabsToolbar::after { 866 | width:1.2em !important; 867 | writing-mode:sideways-lr !important; 868 | align-items:unset !important; 869 | font-size:0.85em !important; 870 | } 871 | /**/ 872 | 873 | 874 | 875 | 876 | /******************************************************************************* 877 | /* ### other (the following are disabled - uncomment any required) 878 | /*------------------------------------------------------------------------------ 879 | /* enable/disable by editing preceeding line(s) as either: /**/ /* 880 | /******************************************************************************/ 881 | 882 | 883 | 884 | 885 | /******************************************************************************* 886 | /* ### toolbar : unified extensions button panel - color add-on names 887 | /*------------------------------------------------------------------------------ 888 | /* the "jigsaw puzzle piece" Extensions button (FF109+) 889 | /* (also see section above for compact/columns) 890 | /* if you want to highlight any add-on names in the list... 891 | /* - you might be able to select using start of name with '[label^="..."]' 892 | /* - or use '[data-extensionid="..."]' with ID from 'about:support#addons' page 893 | /* - or for add-ons with no toolbar icon select with '[extension-id="..."]' 894 | /* - perhaps uncomment '@import "./userChrome-my-extras.css";' near the top 895 | /* and put your selectors and colors in a file with that name 896 | /*------------------------------------------------------------------------------ 897 | /* example selectors: 898 | /* [label^="..."], [data-extensionid="..."], [extension-id="..."], 899 | /* [label^="uBlock Origin"], [data-extensionid="uBlock0@raymondhill.net"], 900 | /* [label^="Name"], [data-extensionid="{aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa}"], 901 | /*------------------------------------------------------------------------------ 902 | /* list the selectors/addons, open about:addons, run in console (Ctrl+Shift+K): 903 | /* AddonManager.getAddonsByTypes(["extension"]).then(addons => { var list=``; addons.sort((a,b)=>{return a.name.localeCompare(b.name);}).forEach(addon => { if(!(addon.isBuiltin||addon.isSystem)){ list+=` [label^="${addon.name}"],[addon-id="${addon.id}"],[data-extensionid="${addon.id}"],[extension-id="${addon.id}"],\n`; } }); console.log(list); }); 904 | /******************************************************************************/ 905 | /* 906 | #unified-extensions-panel vbox > :where( 907 | [label^="..."], [data-extensionid="..."], [extension-id="..."] 908 | ) .unified-extensions-item-name 909 | { 910 | background: LimeGreen !important; 911 | color: Black !important; 912 | } 913 | 914 | #unified-extensions-panel vbox > :where( 915 | [label^="..."], [data-extensionid="..."], [extension-id="..."] 916 | ) .unified-extensions-item-name 917 | { 918 | background: DeepSkyBlue !important; 919 | color: Black !important; 920 | } 921 | 922 | #unified-extensions-panel vbox > :where( 923 | [label^="..."], [data-extensionid="..."], [extension-id="..."] 924 | ) .unified-extensions-item-name 925 | { 926 | background: Gold !important; 927 | color: Black !important; 928 | } 929 | 930 | #unified-extensions-panel vbox > :where( 931 | [label^="..."], [data-extensionid="..."], [extension-id="..."] 932 | ) .unified-extensions-item-name 933 | { 934 | background: DarkOrange !important; 935 | color: Black !important; 936 | } 937 | 938 | #unified-extensions-panel vbox > :where( 939 | [label^="..."], [data-extensionid="..."], [extension-id="..."] 940 | ) .unified-extensions-item-name 941 | { 942 | background: PaleVioletRed !important; 943 | color: Black !important; 944 | } 945 | 946 | #unified-extensions-panel vbox > :where( 947 | [label^="..."], [data-extensionid="..."], [extension-id="..."] 948 | ) .unified-extensions-item-name 949 | { 950 | background: Crimson !important; 951 | color: LightGray !important; 952 | } 953 | 954 | #unified-extensions-panel vbox > :where( 955 | [label^="..."], [data-extensionid="..."], [extension-id="..."] 956 | ) .unified-extensions-item-name 957 | { 958 | background: DarkGray !important; 959 | color: Black !important; 960 | } 961 | /**/ 962 | 963 | 964 | 965 | 966 | /******************************************************************************* 967 | /* ### tabs : no text fade out (on the right edge) 968 | /*------------------------------------------------------------------------------ 969 | /* https://github.com/Aris-t2/CustomCSSforFx/blob/master/classic/css/tabs/tab_titles_remove_blur.css 970 | /******************************************************************************/ 971 | /* 972 | .tab-label-container[textoverflow]:not([pinned]) { 973 | mask-image: unset !important; 974 | } 975 | /**/ 976 | 977 | 978 | 979 | 980 | /******************************************************************************* 981 | /* ### tabs : hide tab close buttons 982 | /*------------------------------------------------------------------------------ 983 | /* tip: quick close tab by holding down right click and release on "Close Tab" 984 | /* or use middle mouse click, or 'about:config' "browser.tabs.closeTabByDblclick" 985 | /* https://support.mozilla.org/en-US/questions/1177825 986 | /* https://github.com/Aris-t2/CustomCSSforFx/blob/master/classic/css/tabs/tab_close_hidden.css 987 | /* notes: 988 | /* #tabbrowser-tabs .tabbrowser-tab .tab-close-button { display: none !important; } 989 | /* if you want hide close buttons but excluding selected tab: 990 | /* https://www.reddit.com/r/FirefoxCSS/comments/xoopet/like_many_others_im_wanting_to_make_the_move_from/ 991 | /* #tabbrowser-tabs[closebuttons="activetab"] .tab-close-button:not([selected]) 992 | /******************************************************************************/ 993 | /* 994 | .tabbrowser-tab .tab-close-button { visibility: collapse !important; } 995 | /**/ 996 | 997 | 998 | 999 | 1000 | /******************************************************************************* 1001 | /* ### url box : enforce minimum width 1002 | /*------------------------------------------------------------------------------ 1003 | /* vw = % of viewport width 1004 | /* https://github.com/MrOtherGuy/firefox-csshacks/blob/master/chrome/navbar_tabs_oneliner.css 1005 | /* notes: 1006 | /* #urlbar[open]:focus-within { min-width: 60vw !important; } 1007 | /* #urlbar-container:focus-within { min-width: 60vw !important; } 1008 | /******************************************************************************/ 1009 | /* 1010 | #urlbar-container { 1011 | min-width: 55vw !important; 1012 | max-width: 100% !important; 1013 | } 1014 | /**/ 1015 | 1016 | 1017 | 1018 | 1019 | /******************************************************************************* 1020 | /* ### url box : hide container symbol 1021 | /******************************************************************************/ 1022 | /* 1023 | #userContext-indicator { display: none; } 1024 | /**/ 1025 | 1026 | 1027 | 1028 | 1029 | /******************************************************************************* 1030 | /* ### url box : hide bookmark button 1031 | /*------------------------------------------------------------------------------ 1032 | /* if you do not use bookmarks (eg you use a note taking app instead) 1033 | /* you can still bookmark from: Ctrl-D / right click tab / menu>Bookmarks 1034 | /******************************************************************************/ 1035 | /* 1036 | #star-button-box { display: none; } 1037 | /**/ 1038 | 1039 | 1040 | 1041 | 1042 | /******************************************************************************* 1043 | /* ### tab bar : hide until nav area hovered 1044 | /*------------------------------------------------------------------------------ 1045 | /* https://www.reddit.com/r/FirefoxCSS/comments/xy6m5z/how_to_hide_tabs_toolbar_unless_hovering_over_top/ 1046 | /******************************************************************************/ 1047 | /* 1048 | #TabsToolbar{ 1049 | -moz-window-dragging: no-drag; 1050 | visibility: collapse; 1051 | } 1052 | #navigator-toolbox:hover #TabsToolbar{ visibility: visible } 1053 | /**/ 1054 | 1055 | 1056 | 1057 | 1058 | /******************************************************************************* 1059 | /* ### tab bar : hide "List all tabs" button 1060 | /*------------------------------------------------------------------------------ 1061 | /* show on tab overflow: 'about:config' "browser.tabs.tabmanager.enabled" false 1062 | /* always hide: use css 1063 | /* https://www.reddit.com/r/FirefoxCSS/comments/8uz9d1/show_list_all_tabs_button_always/ 1064 | /* https://www.reddit.com/r/FirefoxCSS/comments/f2bru9/list_all_tabs_button_not_showing_in_73/ 1065 | /* visibility: visible !important; display: initial !important; 1066 | /* https://www.reddit.com/r/FirefoxCSS/comments/ybntlw/how_to_hide_or_remove_the_new_tab_menu/ 1067 | /* #tabbrowser-tabs:not([overflow="true"]) ~ #alltabs-button{ display: none } 1068 | /******************************************************************************/ 1069 | /* 1070 | #alltabs-button { display: none !important; } 1071 | /**/ 1072 | 1073 | 1074 | 1075 | 1076 | /******************************************************************************/ 1077 | --------------------------------------------------------------------------------