├── JS ├── test.uc.js ├── userChrome_ag_css.uc.js └── userChrome_au_css.uc.js ├── Installation Guide.txt ├── Fox.png ├── Close.png ├── Fox2.png ├── Fox3.PNG ├── Stop.png ├── Center Urlbar.PNG ├── Icons8-Left.png ├── Icons8-Plugin.png ├── Icons8-Plus.png ├── Icons8-Reduce.png ├── Icons8-right.png ├── Lockwise-Logo.png ├── Icons8-Bookmark.PNG ├── Icons8-Download.png ├── Icons8-Drop-Up.png ├── Icons8-Drop-Up2.png ├── Icons8-Drop-Up3.png ├── Icons8-Drop-Up4.png ├── Icons8-Drop-Up5.png ├── Icons8-Drop-Up6.png ├── Icons8-Mozilla.PNG ├── Icons8-Mozilla2.PNG ├── Icons8-Mozilla3.PNG ├── Icons8-Mozilla4.PNG ├── Icons8-Mozilla5.PNG ├── Icons8-Plugin2.PNG ├── Icons8-Plugin3.png ├── Icons8-Plugin4.png ├── Icons8-Settings.png ├── Icons8-Warning.png ├── Icons8-Warning2.png ├── resources ├── Fox2.png ├── Icons8.com-Home.ico ├── Iconsdb.com-Left.png ├── Icons8.com-Lockwise.png ├── Iconsdb.com-Settings.png ├── Icons8.com-Private-fox.png ├── Icons8.com-DefaultFavicon.png ├── Newtab-Firefox-Logo-Nightly.png ├── Iconsdb.com-SubMenu-Arrow-Right.png ├── downloads │ ├── double-download.svg │ ├── downloads.svg │ ├── download-blocked.svg │ ├── download-summary.svg │ ├── download-icons.svg │ └── notification-start-animation.svg ├── skin │ ├── back.svg │ └── forward.svg ├── Close.svg └── Mozilla Public License ├── Icons8-Auto-hide.png ├── Icons8-Customize.png ├── Icons8-Customize2.png ├── Icons8-Drop-Down.png ├── Icons8-Drop-Down2.png ├── Icons8-Drop-Down3.png ├── Icons8-Drop-Down4.png ├── Icons8-Drop-Down5.png ├── Icons8-Settings3.png ├── Icons8-Settings4.png ├── Icons8.com-Avatar.png ├── Icons8.com-Google.png ├── Icons8.com-New-Tab.png ├── Icons8.com-Restore.png ├── Icons8.com-Volume.png ├── Oxanium-SemiBold.ttf ├── Icons8.com-All-Tabs.png ├── Icons8.com-Close-Tab.png ├── Icons8.com-Maximize.png ├── Icons8.com-Maximize2.png ├── Icons8.com-Minimize.png ├── Icons8.com-Minimize2.png ├── Icons8.com-Restore2.png ├── Iconsdb.com-Organize.png ├── Icons8-Bookmark-Filled.PNG ├── Icons8-Bookmark-Hover.PNG ├── Icons8.com-More-Tools.png ├── Icons8.com-Private-fox.png ├── Icons8.com-Volume-Mute.png ├── Icons8.com-Volume-Mute2.png ├── Iconsdb.com-Arrow-Down.png ├── Iconsdb.com-Personalize.png ├── Iconsdb.com-Volume-Mute.png ├── Icons8.com-Close-Firefox.png ├── Icons8.com-Close2-Firefox.png ├── Icons8.com-Close3-Firefox.png ├── Icons8.com-Maximize-Hover.png ├── Icons8.com-Minimize-Hover.png ├── Icons8.com-Restore-Hover.png ├── Icons8.com-Volume-Active.png ├── Icons8.com-Volume-Active2.png ├── Iconsdb.com-Volume-Active.png ├── Icons8.com-VerticalTabs-Pin.png ├── Iconsdb.com-Organize-Hover.png ├── Icons8-Bookmark-Titlebar-Hover.PNG ├── Icons8.com-Close-Firefox-Hover.png ├── Icons8.com-VerticalTabs-Button.png ├── Icons8.com-VerticalTabs-UnPin.png ├── Icons8.com-Volume-Mute-Active.png ├── Iconsdb.com-Volume-Mute-Active.png ├── Icons8-Bookmark2-Titlebar-Hover.PNG ├── Icons8.com-All-Tabs-Hover-Active.png ├── Icons8.com-New-Tab-Hover-Active.png ├── Icons8.com-Volume-Active-Playing.png ├── Iconsdb.com-SubMenu-Arrow-Right.png ├── Iconsdb.com-Volume-Active-Playing.png ├── Icons8-Filled-Bookmark-Ribbon-Hover.PNG ├── Icons8.com-More-Tools-Hover-Active.png ├── Icons8.com-VerticalTabs-Button-Hover-Active.png ├── Icons8-Filled-Bookmark-Ribbon-Titlebar-Hover.PNG ├── Icons8-Filled-Bookmark2-Ribbon-Titlebar-Hover.PNG ├── icons8-filled-bookmark-ribbon.svg ├── icons8-bookmark.svg ├── .github └── workflows │ └── main.yml ├── Icons8-directory.svg ├── user.js ├── utils ├── chrome.manifest └── boot.jsm ├── README.md ├── script └── restoreTabSoundButton.uc.js ├── css └── appbutton │ └── appbutton_in_titlebar_icon_only_fx74.css └── LICENSE /JS/test.uc.js: -------------------------------------------------------------------------------- 1 | console.log("Hi mom, I'm loaded!"); -------------------------------------------------------------------------------- /Installation Guide.txt: -------------------------------------------------------------------------------- 1 | https://youtu.be/PvwuzUNqKIk -------------------------------------------------------------------------------- /Fox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Fox.png -------------------------------------------------------------------------------- /Close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Close.png -------------------------------------------------------------------------------- /Fox2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Fox2.png -------------------------------------------------------------------------------- /Fox3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Fox3.PNG -------------------------------------------------------------------------------- /Stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Stop.png -------------------------------------------------------------------------------- /Center Urlbar.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Center Urlbar.PNG -------------------------------------------------------------------------------- /Icons8-Left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Left.png -------------------------------------------------------------------------------- /Icons8-Plugin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Plugin.png -------------------------------------------------------------------------------- /Icons8-Plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Plus.png -------------------------------------------------------------------------------- /Icons8-Reduce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Reduce.png -------------------------------------------------------------------------------- /Icons8-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-right.png -------------------------------------------------------------------------------- /Lockwise-Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Lockwise-Logo.png -------------------------------------------------------------------------------- /Icons8-Bookmark.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Bookmark.PNG -------------------------------------------------------------------------------- /Icons8-Download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Download.png -------------------------------------------------------------------------------- /Icons8-Drop-Up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Drop-Up.png -------------------------------------------------------------------------------- /Icons8-Drop-Up2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Drop-Up2.png -------------------------------------------------------------------------------- /Icons8-Drop-Up3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Drop-Up3.png -------------------------------------------------------------------------------- /Icons8-Drop-Up4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Drop-Up4.png -------------------------------------------------------------------------------- /Icons8-Drop-Up5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Drop-Up5.png -------------------------------------------------------------------------------- /Icons8-Drop-Up6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Drop-Up6.png -------------------------------------------------------------------------------- /Icons8-Mozilla.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Mozilla.PNG -------------------------------------------------------------------------------- /Icons8-Mozilla2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Mozilla2.PNG -------------------------------------------------------------------------------- /Icons8-Mozilla3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Mozilla3.PNG -------------------------------------------------------------------------------- /Icons8-Mozilla4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Mozilla4.PNG -------------------------------------------------------------------------------- /Icons8-Mozilla5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Mozilla5.PNG -------------------------------------------------------------------------------- /Icons8-Plugin2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Plugin2.PNG -------------------------------------------------------------------------------- /Icons8-Plugin3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Plugin3.png -------------------------------------------------------------------------------- /Icons8-Plugin4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Plugin4.png -------------------------------------------------------------------------------- /Icons8-Settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Settings.png -------------------------------------------------------------------------------- /Icons8-Warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Warning.png -------------------------------------------------------------------------------- /Icons8-Warning2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Warning2.png -------------------------------------------------------------------------------- /resources/Fox2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/resources/Fox2.png -------------------------------------------------------------------------------- /Icons8-Auto-hide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Auto-hide.png -------------------------------------------------------------------------------- /Icons8-Customize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Customize.png -------------------------------------------------------------------------------- /Icons8-Customize2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Customize2.png -------------------------------------------------------------------------------- /Icons8-Drop-Down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Drop-Down.png -------------------------------------------------------------------------------- /Icons8-Drop-Down2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Drop-Down2.png -------------------------------------------------------------------------------- /Icons8-Drop-Down3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Drop-Down3.png -------------------------------------------------------------------------------- /Icons8-Drop-Down4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Drop-Down4.png -------------------------------------------------------------------------------- /Icons8-Drop-Down5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Drop-Down5.png -------------------------------------------------------------------------------- /Icons8-Settings3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Settings3.png -------------------------------------------------------------------------------- /Icons8-Settings4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Settings4.png -------------------------------------------------------------------------------- /Icons8.com-Avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Avatar.png -------------------------------------------------------------------------------- /Icons8.com-Google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Google.png -------------------------------------------------------------------------------- /Icons8.com-New-Tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-New-Tab.png -------------------------------------------------------------------------------- /Icons8.com-Restore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Restore.png -------------------------------------------------------------------------------- /Icons8.com-Volume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Volume.png -------------------------------------------------------------------------------- /Oxanium-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Oxanium-SemiBold.ttf -------------------------------------------------------------------------------- /Icons8.com-All-Tabs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-All-Tabs.png -------------------------------------------------------------------------------- /Icons8.com-Close-Tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Close-Tab.png -------------------------------------------------------------------------------- /Icons8.com-Maximize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Maximize.png -------------------------------------------------------------------------------- /Icons8.com-Maximize2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Maximize2.png -------------------------------------------------------------------------------- /Icons8.com-Minimize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Minimize.png -------------------------------------------------------------------------------- /Icons8.com-Minimize2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Minimize2.png -------------------------------------------------------------------------------- /Icons8.com-Restore2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Restore2.png -------------------------------------------------------------------------------- /Iconsdb.com-Organize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Iconsdb.com-Organize.png -------------------------------------------------------------------------------- /Icons8-Bookmark-Filled.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Bookmark-Filled.PNG -------------------------------------------------------------------------------- /Icons8-Bookmark-Hover.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Bookmark-Hover.PNG -------------------------------------------------------------------------------- /Icons8.com-More-Tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-More-Tools.png -------------------------------------------------------------------------------- /Icons8.com-Private-fox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Private-fox.png -------------------------------------------------------------------------------- /Icons8.com-Volume-Mute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Volume-Mute.png -------------------------------------------------------------------------------- /Icons8.com-Volume-Mute2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Volume-Mute2.png -------------------------------------------------------------------------------- /Iconsdb.com-Arrow-Down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Iconsdb.com-Arrow-Down.png -------------------------------------------------------------------------------- /Iconsdb.com-Personalize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Iconsdb.com-Personalize.png -------------------------------------------------------------------------------- /Iconsdb.com-Volume-Mute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Iconsdb.com-Volume-Mute.png -------------------------------------------------------------------------------- /Icons8.com-Close-Firefox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Close-Firefox.png -------------------------------------------------------------------------------- /Icons8.com-Close2-Firefox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Close2-Firefox.png -------------------------------------------------------------------------------- /Icons8.com-Close3-Firefox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Close3-Firefox.png -------------------------------------------------------------------------------- /Icons8.com-Maximize-Hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Maximize-Hover.png -------------------------------------------------------------------------------- /Icons8.com-Minimize-Hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Minimize-Hover.png -------------------------------------------------------------------------------- /Icons8.com-Restore-Hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Restore-Hover.png -------------------------------------------------------------------------------- /Icons8.com-Volume-Active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Volume-Active.png -------------------------------------------------------------------------------- /Icons8.com-Volume-Active2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Volume-Active2.png -------------------------------------------------------------------------------- /Iconsdb.com-Volume-Active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Iconsdb.com-Volume-Active.png -------------------------------------------------------------------------------- /resources/Icons8.com-Home.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/resources/Icons8.com-Home.ico -------------------------------------------------------------------------------- /Icons8.com-VerticalTabs-Pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-VerticalTabs-Pin.png -------------------------------------------------------------------------------- /Iconsdb.com-Organize-Hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Iconsdb.com-Organize-Hover.png -------------------------------------------------------------------------------- /resources/Iconsdb.com-Left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/resources/Iconsdb.com-Left.png -------------------------------------------------------------------------------- /Icons8-Bookmark-Titlebar-Hover.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Bookmark-Titlebar-Hover.PNG -------------------------------------------------------------------------------- /Icons8.com-Close-Firefox-Hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Close-Firefox-Hover.png -------------------------------------------------------------------------------- /Icons8.com-VerticalTabs-Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-VerticalTabs-Button.png -------------------------------------------------------------------------------- /Icons8.com-VerticalTabs-UnPin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-VerticalTabs-UnPin.png -------------------------------------------------------------------------------- /Icons8.com-Volume-Mute-Active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Volume-Mute-Active.png -------------------------------------------------------------------------------- /Iconsdb.com-Volume-Mute-Active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Iconsdb.com-Volume-Mute-Active.png -------------------------------------------------------------------------------- /resources/Icons8.com-Lockwise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/resources/Icons8.com-Lockwise.png -------------------------------------------------------------------------------- /resources/Iconsdb.com-Settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/resources/Iconsdb.com-Settings.png -------------------------------------------------------------------------------- /Icons8-Bookmark2-Titlebar-Hover.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Bookmark2-Titlebar-Hover.PNG -------------------------------------------------------------------------------- /Icons8.com-All-Tabs-Hover-Active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-All-Tabs-Hover-Active.png -------------------------------------------------------------------------------- /Icons8.com-New-Tab-Hover-Active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-New-Tab-Hover-Active.png -------------------------------------------------------------------------------- /Icons8.com-Volume-Active-Playing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-Volume-Active-Playing.png -------------------------------------------------------------------------------- /Iconsdb.com-SubMenu-Arrow-Right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Iconsdb.com-SubMenu-Arrow-Right.png -------------------------------------------------------------------------------- /Iconsdb.com-Volume-Active-Playing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Iconsdb.com-Volume-Active-Playing.png -------------------------------------------------------------------------------- /resources/Icons8.com-Private-fox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/resources/Icons8.com-Private-fox.png -------------------------------------------------------------------------------- /Icons8-Filled-Bookmark-Ribbon-Hover.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Filled-Bookmark-Ribbon-Hover.PNG -------------------------------------------------------------------------------- /Icons8.com-More-Tools-Hover-Active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-More-Tools-Hover-Active.png -------------------------------------------------------------------------------- /resources/Icons8.com-DefaultFavicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/resources/Icons8.com-DefaultFavicon.png -------------------------------------------------------------------------------- /resources/Newtab-Firefox-Logo-Nightly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/resources/Newtab-Firefox-Logo-Nightly.png -------------------------------------------------------------------------------- /Icons8.com-VerticalTabs-Button-Hover-Active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8.com-VerticalTabs-Button-Hover-Active.png -------------------------------------------------------------------------------- /resources/Iconsdb.com-SubMenu-Arrow-Right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/resources/Iconsdb.com-SubMenu-Arrow-Right.png -------------------------------------------------------------------------------- /Icons8-Filled-Bookmark-Ribbon-Titlebar-Hover.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Filled-Bookmark-Ribbon-Titlebar-Hover.PNG -------------------------------------------------------------------------------- /Icons8-Filled-Bookmark2-Ribbon-Titlebar-Hover.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BloodyHell619/Firefox-Theme-DarkMatter/HEAD/Icons8-Filled-Bookmark2-Ribbon-Titlebar-Hover.PNG -------------------------------------------------------------------------------- /resources/downloads/double-download.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /icons8-filled-bookmark-ribbon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /resources/downloads/downloads.svg: -------------------------------------------------------------------------------- 1 | 3 | 5 | 6 | -------------------------------------------------------------------------------- /icons8-bookmark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: "tagged-release" 2 | 3 | on: 4 | push: 5 | tags: 6 | - "v*" 7 | 8 | jobs: 9 | tagged-release: 10 | name: "Tagged Release" 11 | runs-on: "ubuntu-latest" 12 | 13 | steps: 14 | # ... 15 | - name: "Publish a new release" 16 | run: | 17 | echo "done!" 18 | - uses: "marvinpinto/action-automatic-releases@latest" 19 | with: 20 | repo_token: "${{ secrets.GITHUB_TOKEN }}" 21 | prerelease: false 22 | -------------------------------------------------------------------------------- /resources/skin/back.svg: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /resources/Close.svg: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /resources/skin/forward.svg: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /resources/downloads/download-blocked.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Icons8-directory.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /JS/userChrome_ag_css.uc.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name userChrome_agent_css 3 | // @namespace userChrome_Agent_Sheet_CSS 4 | // @version 0.0.6 5 | // @description Load userChrome.ag.css as agent sheet from resources folder using chrome: uri 6 | // @backgroundmodule 7 | // ==/UserScript== 8 | 9 | let EXPORTED_SYMBOLS = []; 10 | (function () { 11 | const {Services} = ChromeUtils.import('resource://gre/modules/Services.jsm'); 12 | let sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService); 13 | 14 | // Try to load userChrome.ag.css as agent sheet 15 | // WARNING - agent sheets loaded like this affect each and every document you load including web sites. So be careful with your custom styles. 16 | 17 | try{ 18 | sss.loadAndRegisterSheet(Services.io.newURI("chrome://userChrome/content/userChrome.ag.css"), sss.AGENT_SHEET); 19 | }catch(e){ 20 | console.error(`Could not load userChrome.ag.css: ${e.name}`) 21 | } 22 | })(); -------------------------------------------------------------------------------- /resources/downloads/download-summary.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /JS/userChrome_au_css.uc.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name userChrome_author_css 3 | // @namespace userChrome_Author_Sheet_CSS 4 | // @version 0.0.5 5 | // @description Load userChrome.au.css file as author sheet from resources folder using chrome: uri. The file is loaded only into the document where this script runs which by default is browser.xhtml 6 | // @onlyonce 7 | // @startup preloadedAuthorSheet 8 | // ==/UserScript== 9 | 10 | (function () { 11 | // define a startup object for the script loader to execute 12 | // wherever this script is loaded 13 | _ucUtils.sharedGlobal.preloadedAuthorSheet = { 14 | sheet: null, 15 | _startup: function(win){ 16 | if(!win || !this.sheet){ 17 | return 18 | } 19 | win.windowUtils.addSheet(this.sheet,Ci.nsIDOMWindowUtils.AGENT_SHEET); 20 | } 21 | }; 22 | // The next things execute only once per sessions because of @onlyonce in the header 23 | let sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService); 24 | try{ 25 | // Try to preload the file and save it to global area 26 | _ucUtils.sharedGlobal.preloadedAuthorSheet.sheet = sss.preloadSheet(makeURI("chrome://userChrome/content/userChrome.au.css"), sss.AUTHOR_SHEET); 27 | }catch(e){ 28 | console.error(`Could not pre-load userChrome.au.css: ${e.name}`) 29 | } 30 | })(); -------------------------------------------------------------------------------- /resources/downloads/download-icons.svg: -------------------------------------------------------------------------------- 1 | 4 | 5 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /user.js: -------------------------------------------------------------------------------- 1 | // just the required prefs 2 | // allow user stylesheets 3 | user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); 4 | // enable proton 5 | user_pref("browser.proton.enabled", true); 6 | user_pref("browser.proton.places-tooltip.enabled", true); 7 | // required for author sheets 8 | user_pref("layout.css.moz-document.content.enabled", true); 9 | user_pref("layout.css.xul-box-display-values.content.enabled", true); 10 | user_pref("layout.css.xul-display-values.content.enabled", true); 11 | // required for icons with data URLs 12 | user_pref("svg.context-properties.content.enabled", true); 13 | // required for acrylic gaussian blur 14 | user_pref("layout.css.backdrop-filter.enabled", true); 15 | // prevent bugs that would otherwise be caused by the custom scrollbars in the user-agent sheet 16 | user_pref("layout.css.cached-scrollbar-styles.enabled", false); 17 | // the theme doesn't have a light mode as of yet 18 | user_pref("ui.systemUsesDarkTheme", 1); 19 | // svg optimizations 20 | user_pref("gfx.webrender.svg-images", true); 21 | // allow stylesheets to modify trees in system pages viewed in regular tabs 22 | user_pref("layout.css.xul-tree-pseudos.content.enabled", true); 23 | // allow the color-mix() CSS function 24 | user_pref("layout.css.color-mix.enabled", true); 25 | // other CSS features 26 | user_pref("layout.css.moz-outline-radius.enabled", true); 27 | // avoid native styling 28 | user_pref("browser.display.windows.non_native_menus", 1); 29 | user_pref("widget.disable-native-theme-for-content", true); 30 | user_pref("widget.non-native-theme.win.scrollbar.use-system-size", false); 31 | // keep "all tabs" menu available at all times, useful for all tabs menu expansion pack 32 | user_pref("browser.tabs.tabmanager.enabled", true); 33 | -------------------------------------------------------------------------------- /utils/chrome.manifest: -------------------------------------------------------------------------------- 1 | content userchromejs ./ 2 | content userscripts ../script/ 3 | content userchrome ../resources/ 4 | resource content-accessible chrome://userchrome/content/layout/contentaccessible/ contentaccessible=yes 5 | 6 | override chrome://branding/content/icon32.png ../resources/Fox2.png 7 | override chrome://browser/skin/privatebrowsing/favicon.svg ../resources/Icons8.com-Private-fox.png 8 | override chrome://branding/content/about-logo.png ../resources/Newtab-Firefox-Logo-Nightly.png 9 | override chrome://global/skin/icons/arrow-left.svg ../resources/Iconsdb.com-Left.png 10 | override chrome://global/skin/icons/defaultFavicon.svg ../resources/Icons8.com-DefaultFavicon.png 11 | override chrome://browser/skin/downloads/downloads.svg ../resources/downloads/downloads.svg 12 | override chrome://browser/skin/forward.svg ../resources/skin/forward.svg 13 | override chrome://browser/skin/back.svg ../resources/skin/back.svg 14 | override chrome://browser/content/aboutlogins/icons/favicon.svg ../resources/Icons8.com-Lockwise.png 15 | override chrome://global/skin/icons/close.svg ../resources/close.svg 16 | override chrome://global/skin/icons/menu-arrow.svg ../resources/Iconsdb.com-SubMenu-Arrow-Right.png 17 | 18 | 19 | /*override chrome://browser/skin/indicator-private-browsing.svg ../resources/Icons8.com-Private-fox.svg*/ 20 | /*override chrome://global/skin/icons/settings.svg ../resources/Iconsdb.com-Settings.png*/ 21 | /*override chrome://global/skin/icons/info.svg ../resources/Icons8.com-Warning.png*/ 22 | /*override chrome://global/skin/icons/folder.svg ../resources/material/places/folder.svg*/ 23 | /*override chrome://browser/content/extension.svg ../resources/Icons8.com-Extension.png*/ 24 | /*override chrome://mozapps/skin/extensions/extension.svg ../resources/Icons8.com-Extension.png*/ 25 | /* override chrome://global/skin/icons/twisty-expanded.svg ../resources/close.svg 26 | override chrome://global/skin/icons/twisty-collapsed-rtl.svg ../resources/close.svg 27 | override chrome://global/skin/icons/twisty-collapsed.svg ../resources/close.svg */ 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

- ᗪ 卂 尺 Ҝ 爪 卂 ㄒ ㄒ 乇 尺 -

2 |
3 |

An intensively worked on, and highly customized dark theme made for Firefox Proton, stretching darkness into every corner of the browser and perfecting even the tiniest details

4 |

5 |
6 | 7 | accessibility text 8 |

9 |

Unlike my previous theme which needed you to use an add-on called Theme Creator and to figure out colors, there is no need for that with this theme as all the colors are coded into the CSS files

10 |
11 |

- 丂ㄖ爪乇    ㄖ千    ㄒ卄乇    爪卂丨几    千乇卂ㄒㄩ尺乇丂    ㄖ千    ㄒ卄乇    ㄒ卄乇爪乇    -

12 |

- Vertical tabs -

13 |

- Custom Bookmarkbar -

14 |

- Menu in Titlebar -

15 |

Dark embossed theme pretty much everywhere; from the tiniest places in the interface, settings, add-ons tab, ... all the way to the library and even on to stuff like the right-click menu and save as pop-up (This is also applied regardless of your operating system's theme!) 16 |

box shaped compact tabs even in Proton which has removed the compact view mode (Tabs will not expand even if you open up too many as all the toolbar buttons have been resized and fixed delicately to prevent expansion)

17 | 18 |
19 |

- 丨几丂ㄒ卂ㄥㄥ卂ㄒ丨ㄖ几    Ꮆㄩ丨ᗪ乇 -

20 |

https://youtu.be/PvwuzUNqKIk

21 |
22 |

- 卂匚Ҝ几ㄖ山ㄥ乇ᗪᎶ爪乇几ㄒ -

23 |

Massive thanks to every single person in Mozilla for giving us this great browser and for continuing to develop it for all these years

24 |

Huge thanks to the great and warm Firefox CSS Community, which creating this theme without wasn't possible.

25 |

https://www.reddit.com/r/FirefoxCSS/

26 |

A special thanks to these 2 extremely knowledgeable users who constantly helped me with finding codes and figuring stuff out in extreme detail and who are responsible for laying much of the foundation required for creating this theme

27 |

爪ㄖㄒ卄乇尺丂ㄒㄚㄥㄩ丂    &    丨ㄒ_山卂丂_ㄒ卄乇_ㄖㄒ卄乇尺_Ꮆㄩㄚ

28 |

https://www.reddit.com/user/It_Was_The_Other_Guy/

29 |

https://www.reddit.com/user/MotherStylus/

30 |
31 |

thanks to MotherStylus for also helping me set up a GitHub repository in perfect detail 32 | you can refer to this comment if you also want to use his great info

33 |

https://www.reddit.com/r/FirefoxCSS/comments/o88kkn/need_to_change_these_2_things_in_the_show_your/h3nw2yr?utm_source=share&utm_medium=web2x&context=3

34 |
35 |

- Ꮆ尺乇卂ㄒ    尺乇卩ㄖ丂丨ㄒㄖ尺乇丂    ㄩ丂乇ᗪ    千ㄖ尺    丂ㄖ爪乇    爪卂丨几    乇ㄥ乇爪乇几ㄒ丂 -

36 |

userChrome.js manager by It_Was_The_Other_Guy used for enabling custom scripts 37 |

https://github.com/MrOtherGuy/fx-autoconfig

38 | 39 |

Vertical tabs adopted from MotherStylus's theme

40 |

https://github.com/aminomancer/uc.css.js

41 | 42 |

button-like navbar buttons adopted from It_Was_The_Other_Guy's massive repository of Firefox CSS hacks

43 |

https://github.com/MrOtherGuy/firefox-csshacks

44 | 45 |

Menu-in-titlebar code adopted from Aris-t2's collection of custom CSSs

46 |

https://github.com/Aris-t2/CustomCSSforFx

47 |
48 |

- 尺乇匚ㄖ爪爪乇几ᗪ乇ᗪ    卂ᗪᗪ-ㄖ几丂 -

49 |

- 千卂ᐯ丨匚ㄖ几    丂山丨ㄒ匚卄乇尺 -

50 |

For custom site favicons

51 |

https://addons.mozilla.org/en-US/firefox/user/15425431/

52 | 53 |

- ᗪ卂尺Ҝ    乇ㄚ乇 -

54 |

For darkmode websites

55 |

https://addons.mozilla.org/en-US/firefox/addon/night-eye-dark-mode/

56 |
57 |

- 丂丨ㄒ乇丂    千ㄖ尺    千卂ᐯ丨匚ㄖ几丂    &    ㄒㄖ卩-丂丨ㄒ乇丂 丨匚ㄖ几丂    -

58 |

https://icons8.com/

59 |

https://www.iconsdb.com/

60 | -------------------------------------------------------------------------------- /script/restoreTabSoundButton.uc.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name Restore pre-Proton Tab Sound Button 3 | // @version 2.1 4 | // @author aminomancer 5 | // @homepage https://github.com/aminomancer/uc.css.js 6 | // @description Proton makes really big changes to tabs, in particular removing the tab sound button in favor of the overlay button and a whole row of text. This script keeps the new tab tooltip enabled by the pref "browser.proton.places-tooltip.enabled" but allows it to work with the old .tab-icon-sound. So you get the nice parts of the proton tab changes without the second row of text about the audio playing. Instead it will show the mute/unmute tooltip inside the normal tab tooltip. It also changes the tooltip a bit so that it's always anchored to the tab rather than floating around tethered to the exact mouse position. This makes it easier to modify the tooltip appearance without the tooltip getting in your way. This script *requires* that you either 1) use my theme, complete with chrome.manifest and the resources folder, or 2) download resources/script-override/tabMods.uc.js and put it in the same location in your chrome folder, then edit your utils/chrome.manifest file to add the following line (without the "//"): 7 | // override chrome://browser/content/tabbrowser-tab.js ../resources/tabMods.uc.js 8 | // ==/UserScript== 9 | 10 | (async function () { 11 | let css = `.tab-icon-sound-label,.tab-secondary-label{display:none;}.tab-icon-sound{display:-moz-box;}.tab-icon-sound:not([soundplaying],[muted],[activemedia-blocked],[pictureinpicture]),.tab-icon-sound[pinned]{display:none;}.tab-icon-overlay{display:none;}`; 12 | let sss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService); 13 | let uri = makeURI("data:text/css;charset=UTF=8," + encodeURIComponent(css)); 14 | if (!sss.sheetRegistered(uri, sss.AUTHOR_SHEET)) 15 | sss.loadAndRegisterSheet(uri, sss.AUTHOR_SHEET); 16 | gBrowser.createTooltip = function (event) { 17 | event.stopPropagation(); 18 | let tab = document.tooltipNode ? document.tooltipNode.closest("tab") : null; 19 | if (!tab) { 20 | event.preventDefault(); 21 | return; 22 | } 23 | 24 | let stringWithShortcut = (stringId, keyElemId, pluralCount) => { 25 | let keyElem = document.getElementById(keyElemId); 26 | let shortcut = ShortcutUtils.prettifyShortcut(keyElem); 27 | return PluralForm.get(pluralCount, gTabBrowserBundle.GetStringFromName(stringId)) 28 | .replace("%S", shortcut) 29 | .replace("#1", pluralCount); 30 | }; 31 | 32 | let tabRect = windowUtils.getBoundsWithoutFlushing(tab); 33 | let align = true; 34 | let label; 35 | const selectedTabs = this.selectedTabs; 36 | const contextTabInSelection = selectedTabs.includes(tab); 37 | const affectedTabsLength = contextTabInSelection ? selectedTabs.length : 1; 38 | if (tab.mOverCloseButton) { 39 | let rect = windowUtils.getBoundsWithoutFlushing(tab.closeButton); 40 | let shortcut = ShortcutUtils.prettifyShortcut(key_close); 41 | label = PluralForm.get( 42 | affectedTabsLength, 43 | gTabBrowserBundle.GetStringFromName("tabs.closeTabs.tooltip") 44 | ).replace("#1", affectedTabsLength); 45 | if (contextTabInSelection && shortcut) { 46 | if (label.includes("%S")) label = label.replace("%S", shortcut); 47 | else label = label + " (" + shortcut + ")"; 48 | } 49 | align = rect.right - tabRect.left < 250; 50 | } else if (tab._overPlayingIcon) { 51 | let icon = tab.soundPlayingIcon || tab.overlayIcon; 52 | let rect = windowUtils.getBoundsWithoutFlushing(icon); 53 | let stringID; 54 | if (contextTabInSelection) { 55 | stringID = tab.linkedBrowser.audioMuted 56 | ? "tabs.unmuteAudio2.tooltip" 57 | : "tabs.muteAudio2.tooltip"; 58 | label = stringWithShortcut(stringID, "key_toggleMute", affectedTabsLength); 59 | } else { 60 | if (tab.hasAttribute("activemedia-blocked")) { 61 | stringID = "tabs.unblockAudio2.tooltip"; 62 | } else { 63 | stringID = tab.linkedBrowser.audioMuted 64 | ? "tabs.unmuteAudio2.background.tooltip" 65 | : "tabs.muteAudio2.background.tooltip"; 66 | } 67 | 68 | label = PluralForm.get( 69 | affectedTabsLength, 70 | gTabBrowserBundle.GetStringFromName(stringID) 71 | ).replace("#1", affectedTabsLength); 72 | } 73 | align = rect.right - tabRect.left < 250; 74 | } else label = this.getTabTooltip(tab); 75 | 76 | if (!gProtonPlacesTooltip) { 77 | event.target.setAttribute("label", label); 78 | return; 79 | } 80 | 81 | if (align) { 82 | event.target.setAttribute("position", "after_start"); 83 | event.target.moveToAnchor(tab, "after_start"); 84 | } 85 | 86 | let title = event.target.querySelector(".places-tooltip-title"); 87 | title.textContent = label; 88 | let url = event.target.querySelector(".places-tooltip-uri"); 89 | url.value = tab.linkedBrowser?.currentURI?.spec.replace(/^https:\/\//, ""); 90 | let icon = event.target.querySelector("#places-tooltip-insecure-icon"); 91 | icon.hidden = !url.value.startsWith("http://"); 92 | }; 93 | })(); 94 | -------------------------------------------------------------------------------- /resources/downloads/notification-start-animation.svg: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /css/appbutton/appbutton_in_titlebar_icon_only_fx74.css: -------------------------------------------------------------------------------- 1 | /* Firefox Quantum userChrome.css tweaks ************************************************/ 2 | /* Github: https://github.com/aris-t2/customcssforfx ************************************/ 3 | /****************************************************************************************/ 4 | 5 | 6 | /************************************************/ 7 | /* cheat main menu button into title bar ********/ 8 | /************************************************/ 9 | /*#main-window[tabsintitlebar] #PanelUI-button .toolbarbutton-icon { 10 | list-style-image: url("Fox.png") !important; 11 | background: unset !important; 12 | box-shadow: unset !important; 13 | }*/ 14 | 15 | html#main-window body box toolbox#navigator-toolbox toolbar#nav-bar.browser-toolbar toolbaritem#PanelUI-button toolbarbutton#PanelUI-menu-button.toolbarbutton-1:hover { 16 | background-color: #292929 !important; 17 | } 18 | html#main-window body box toolbox#navigator-toolbox toolbar#nav-bar.browser-toolbar toolbaritem#PanelUI-button toolbarbutton#PanelUI-menu-button.toolbarbutton-1[active="true"] { 19 | background-color: #10B2E7 !important; 20 | } 21 | 22 | #main-window[tabsintitlebar] #PanelUI-button #PanelUI-menu-button:hover:not(:active):not([open]) { 23 | border: 0px solid #282828 !important; 24 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.50), 0 0 0 1px #4040405c inset !important; 25 | background-image: none !important; 26 | } 27 | 28 | #main-window[tabsintitlebar] #PanelUI-button #PanelUI-menu-button { 29 | background-color: #282828 !important; 30 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.50), 0 0 0 1px #4040405c inset !important; 31 | border: 0px solid #282828 !important; 32 | } 33 | 34 | #main-window[tabsintitlebar] #PanelUI-button #PanelUI-menu-button { 35 | background-clip: padding-box !important; 36 | padding: 0px 4px 0px !important; 37 | padding-top: 0px; 38 | padding-bottom: 0px; 39 | padding-top: 1px !important; 40 | padding-bottom: 0 !important; 41 | -moz-padding-start: 4px !important; 42 | -moz-padding-end: 45px !important; 43 | height: 28px !important; 44 | border-radius: 0px !important; 45 | margin-top: 1px !important; 46 | margin-left: -5px !important; 47 | } 48 | 49 | 50 | #main-window[tabsintitlebar] #PanelUI-menu-button::after{ 51 | content: "Firefox" !important; 52 | font-size: 16px !important; 53 | } 54 | 55 | #main-window[tabsintitlebar] #PanelUI-menu-button:open::after{ 56 | fill: #fff !important; 57 | color: #fff !important; 58 | } 59 | 60 | #main-window[tabsintitlebar] #PanelUI-menu-button:hover::after { 61 | content: "Menu" !important; 62 | -moz-padding-start: 6px !important; 63 | -moz-padding-end: 5px !important; 64 | } 65 | 66 | /* tabs toolbar adjustments */ 67 | #main-window[tabsintitlebar] #toolbar-menubar { 68 | -moz-margin-start: 43px !important; 69 | } 70 | #main-window[tabsintitlebar][sizemode="maximized"] #toolbar-menubar { 71 | -moz-margin-start: 41px !important; 72 | } 73 | #main-window[uidensity=compact][tabsintitlebar] #toolbar-menubar { 74 | -moz-margin-start: 40px !important; 75 | } 76 | #main-window[uidensity=compact][tabsintitlebar][sizemode="maximized"] #toolbar-menubar { 77 | -moz-margin-start: 39px !important; 78 | } 79 | #main-window[uidensity=touch][tabsintitlebar] #toolbar-menubar { 80 | -moz-margin-start: 48px !important; 81 | } 82 | #main-window[uidensity=touch][tabsintitlebar][sizemode="maximized"] #toolbar-menubar { 83 | -moz-margin-start: 47px !important; 84 | } 85 | 86 | /* tabs toolbar adjustments */ 87 | #main-window[tabsintitlebar] #toolbar-menubar[autohide="true"][inactive="true"] ~ #TabsToolbar{ 88 | -moz-padding-start: 41px !important; 89 | } 90 | #main-window[tabsintitlebar][sizemode="maximized"] #toolbar-menubar[autohide="true"][inactive="true"] ~ #TabsToolbar{ 91 | -moz-padding-start: 41px !important; 92 | } 93 | #main-window[uidensity=compact][tabsintitlebar] #toolbar-menubar[autohide="true"][inactive="true"] ~ #TabsToolbar{ 94 | -moz-padding-start: 40px !important; 95 | } 96 | #main-window[uidensity=compact][tabsintitlebar][sizemode="maximized"] #toolbar-menubar[autohide="true"][inactive="true"] ~ #TabsToolbar{ 97 | -moz-padding-start: 39px !important; 98 | } 99 | #main-window[uidensity=touch][tabsintitlebar] #toolbar-menubar[autohide="true"][inactive="true"] ~ #TabsToolbar{ 100 | -moz-padding-start: 48px !important; 101 | } 102 | #main-window[uidensity=touch][tabsintitlebar][sizemode="maximized"] #toolbar-menubar[autohide="true"][inactive="true"] ~ #TabsToolbar{ 103 | -moz-padding-start: 47px !important; 104 | } 105 | 106 | #main-window[tabsintitlebar][sizemode="fullscreen"] #TabsToolbar { 107 | -moz-padding-start: 43px !important; 108 | } 109 | 110 | #main-window[tabsintitlebar] #toolbar-menubar[autohide="true"]:not([inactive="true"]) ~ #TabsToolbar, 111 | #main-window[tabsintitlebar] #toolbar-menubar[autohide="false"] ~ #TabsToolbar{ 112 | margin-top: 4px !important; 113 | } 114 | 115 | /* appbutton */ 116 | #main-window[tabsintitlebar] #PanelUI-button { 117 | -moz-appearance: none !important; 118 | -moz-box-ordinal-group: 0 !important; 119 | position: fixed !important; 120 | display: flex !important; 121 | height: 22px !important; 122 | margin: 0 !important; 123 | -moz-margin-start: 1px !important; 124 | border: unset !important; 125 | box-shadow: unset !important; 126 | padding-left: 0px !important; 127 | padding-right: 0px !important; 128 | } 129 | 130 | #main-window[tabsintitlebar][sizemode="maximized"] #PanelUI-button { 131 | -moz-margin-start: 0px !important; 132 | } 133 | 134 | #main-window[tabsintitlebar][sizemode="normal"] #PanelUI-button { 135 | top: 0px !important; 136 | } 137 | 138 | #main-window[tabsintitlebar][sizemode="maximized"] #PanelUI-button { 139 | top: 0px !important; 140 | } 141 | 142 | @media (min-resolution: 110dpi) { 143 | #main-window[tabsintitlebar][sizemode="maximized"] #PanelUI-button { 144 | top: 6px !important; 145 | } 146 | } 147 | 148 | @media (min-resolution: 120dpi) { 149 | #main-window[tabsintitlebar][sizemode="maximized"] #PanelUI-button { 150 | top: 5px !important; 151 | } 152 | } 153 | 154 | @media (min-resolution: 140dpi) { 155 | #main-window[tabsintitlebar][sizemode="normal"] #PanelUI-button { 156 | top: 0px !important; 157 | } 158 | #main-window[tabsintitlebar][sizemode="maximized"] #PanelUI-button { 159 | top: 4px !important; 160 | } 161 | } 162 | 163 | @media (min-resolution: 160dpi) { 164 | #main-window[tabsintitlebar][sizemode="maximized"] #PanelUI-button { 165 | top: 2px !important; 166 | } 167 | } 168 | 169 | @media (-moz-windows-classic) { 170 | #main-window[tabsintitlebar][sizemode="maximized"] #PanelUI-button { 171 | top: 2px !important; 172 | } 173 | } 174 | 175 | /* code for Linux/macOS */ 176 | @media not all and (-moz-os-version: windows-win7) { 177 | @media not all and (-moz-os-version: windows-win8) { 178 | @media not all and (-moz-os-version: windows-win10) { 179 | #main-window[tabsintitlebar][sizemode="maximized"] #PanelUI-button { 180 | top: 0px !important; 181 | } 182 | }}} 183 | 184 | #main-window[tabsintitlebar][sizemode="fullscreen"] #PanelUI-button { 185 | top: 1px !important; 186 | } 187 | 188 | /*#main-window[tabsintitlebar] #PanelUI-button #PanelUI-menu-button { 189 | background-clip: padding-box !important; 190 | padding: 0 4px 0 !important; 191 | padding-top: 0 !important; 192 | padding-bottom: 0 !important; 193 | -moz-padding-start: 4px !important; 194 | -moz-padding-end: 4px !important; 195 | height: 22px !important; 196 | border-radius: 0 0 4px 4px; 197 | border-top: none !important; 198 | border-right: 1px solid !important; 199 | border-left: 1px solid !important; 200 | border-bottom: 1px solid !important; 201 | }*/ 202 | 203 | /* code for Linux/macOS */ 204 | @media not all and (-moz-os-version: windows-win7) { 205 | @media not all and (-moz-os-version: windows-win8) { 206 | @media not all and (-moz-os-version: windows-win10) { 207 | #main-window[tabsintitlebar] #PanelUI-button #PanelUI-menu-button { 208 | max-width: 26px !important; 209 | } 210 | }}} 211 | 212 | /* hide button in fullscreen mode, if toolbars get automatically hidden */ 213 | #main-window[tabsintitlebar][sizemode="fullscreen"] #navigator-toolbox[style*="margin-top: -"] #PanelUI-button { 214 | visibility: collapse !important; 215 | } 216 | 217 | /* dropmarker icon / arrow */ 218 | #main-window[tabsintitlebar] #PanelUI-button #PanelUI-menu-button { 219 | list-style-image: unset !important; 220 | -moz-image-region: unset !important; 221 | } 222 | 223 | /* adjust button badge stack */ 224 | #main-window[tabsintitlebar] :-moz-any(#PanelUI-button,#PanelUI-menu-button):not([checked]):not([open]):not(:active) > .toolbarbutton-badge-stack, 225 | #main-window[tabsintitlebar] :-moz-any(#PanelUI-button,#PanelUI-menu-button):not([disabled=true]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-badge-stack, 226 | #main-window[tabsintitlebar] :-moz-any(#PanelUI-button,#PanelUI-menu-button):not([disabled=true]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-badge-stack{ 227 | background: unset !important; 228 | border-color: unset !important; 229 | border: 0 !important; 230 | box-shadow: unset !important; 231 | } 232 | 233 | /* adjust button badge */ 234 | #main-window[tabsintitlebar] #PanelUI-button #PanelUI-menu-button .toolbarbutton-badge-stack .toolbarbutton-badge { 235 | -moz-margin-end: 2px !important; 236 | margin-top: 0px !important; 237 | -moz-margin-start: -30px !important; 238 | } 239 | 240 | /* button color/border */ 241 | 242 | /* orange (default) */ 243 | /*#main-window[tabsintitlebar] #PanelUI-button #PanelUI-menu-button { 244 | background-image: linear-gradient(rgb(247,182,82), rgb(215,98,10) 95%) !important; 245 | border-right-color:hsla(214,89%,21%,.5) !important; 246 | border-left-color: hsla(214,89%,21%,.5) !important; 247 | border-bottom-color: hsla(214,89%,21%,.5) !important; 248 | box-shadow: 0 1px 0 hsla(0,0%,100%,.2) inset, 249 | 0 0 2px 1px hsla(0,0%,100%,.25) inset, 250 | 0 1px 0 0px rgba(255,255,255,.5), 251 | 0 -1px 0 0px rgba(255,255,255,.5), 252 | 1px 0 0 0px rgba(255,255,255,.5), 253 | -1px 0 0 0px rgba(255,255,255,.5) !important; 254 | } 255 | #main-window[tabsintitlebar] #PanelUI-button #PanelUI-menu-button:hover:not(:active):not([open]){ 256 | background-image: radial-gradient(farthest-side at center bottom, rgba(252,240,89,.5) 10%, rgba(252,240,89,0) 70%), 257 | radial-gradient(farthest-side at center bottom, rgb(236,133,0), rgba(255,229,172,0)), 258 | linear-gradient(rgb(246,170,69), rgb(209,74,0) 95%) !important; 259 | border-color: rgba(83,42,6,.9) !important; 260 | box-shadow: 0 1px 0 hsla(0,0%,100%,.15) inset, 261 | 0 0 2px 1px hsla(0,0%,100%,.5) inset, 262 | 0 -1px 0 hsla(0,0%,100%,.2), 263 | 0 1px 0 0px rgba(255,255,255,.5), 264 | 0 -1px 0 0px rgba(255,255,255,.5), 265 | 1px 0 0 0px rgba(255,255,255,.5), 266 | -1px 0 0 0px rgba(255,255,255,.5) !important; 267 | } 268 | #main-window[tabsintitlebar] #PanelUI-button #PanelUI-menu-button:-moz-any(:hover:active,[open]){ 269 | background-image: linear-gradient(rgb(246,170,69), rgb(209,74,0) 95%) !important; 270 | box-shadow: 0 2px 3px rgba(0,0,0,.4) inset, 271 | 0 1px 1px rgba(0,0,0,.2) inset, 272 | 0 1px 0 0px rgba(255,255,255,.5), 273 | 0 -1px 0 0px rgba(255,255,255,.5), 274 | 1px 0 0 0px rgba(255,255,255,.5), 275 | -1px 0 0 0px rgba(255,255,255,.5) !important; 276 | } 277 | */ 278 | /*private browsing - purple */ 279 | /*#main-window[privatebrowsingmode=temporary][tabsintitlebar] #PanelUI-button #PanelUI-menu-button{ 280 | background-image: linear-gradient(rgb(153,38,211), rgb(105,19,163) 95%) !important; 281 | } 282 | #main-window[privatebrowsingmode=temporary][tabsintitlebar] #PanelUI-button #PanelUI-menu-button:hover:not(:active):not([open]){ 283 | background-image: radial-gradient(farthest-side at center bottom, rgba(240,193,255,.5) 10%, rgba(240,193,255,0) 70%), 284 | radial-gradient(farthest-side at center bottom, rgb(192,81,247), rgba(236,172,255,0)), 285 | linear-gradient(rgb(144,20,207), rgb(95,0,158) 95%) !important; 286 | } 287 | #main-window[privatebrowsingmode=temporary][tabsintitlebar] #PanelUI-button #PanelUI-menu-button:-moz-any(:hover:active,[open]) { 288 | background-image: linear-gradient(rgb(144,20,207), rgb(95,0,158) 95%) !important; 289 | }*/ 290 | 291 | /* fix for 'buttons_on_navbar_squared_buttons.css' */ 292 | #main-window[tabsintitlebar][uidensity=compact] #PanelUI-menu-button .toolbarbutton-badge-stack, 293 | #main-window[tabsintitlebar]:not([uidensity=compact]):not([uidensity=touch]) #PanelUI-menu-button .toolbarbutton-badge-stack, 294 | #main-window[tabsintitlebar][uidensity=touch] #PanelUI-menu-button .toolbarbutton-badge-stack { 295 | padding-top: 0px !important; 296 | padding-bottom: 0px !important; 297 | width: unset !important; 298 | height: 22px !important; 299 | } 300 | 301 | #main-window[tabsintitlebar][uidensity=compact] #PanelUI-menu-button .toolbarbutton-icon, 302 | #main-window[tabsintitlebar]:not([uidensity=compact]):not([uidensity=touch]) #PanelUI-menu-button .toolbarbutton-icon, 303 | #main-window[tabsintitlebar][uidensity=touch] #PanelUI-menu-button .toolbarbutton-icon { 304 | padding: 0px !important; 305 | width: 16px !important; 306 | height: 16px !important; 307 | } 308 | 309 | /* fix for toolbar + text mode */ 310 | #main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) toolbaritem #PanelUI-menu-button, 311 | #main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) #PanelUI-menu-button, 312 | #main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) .toolbarbutton-1[type="menu-button"] #PanelUI-menu-button{ 313 | -moz-appearance: unset !important; 314 | } 315 | #main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) toolbaritem #PanelUI-menu-button .toolbarbutton-text, 316 | #main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) #PanelUI-menu-button:not([type="menu-button"]) .toolbarbutton-text, 317 | #main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) .toolbarbutton-1[type="menu-button"] #PanelUI-menu-button .toolbarbutton-text{ 318 | display: none !important; 319 | } 320 | #main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) toolbaritem #PanelUI-menu-button:not([type="menu-button"]), 321 | #main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) #PanelUI-menu-button:not([type="menu-button"]), 322 | #main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) .toolbarbutton-1[type="menu-button"] #PanelUI-menu-button{ 323 | -moz-box-orient: unset !important; 324 | min-width: unset !important; 325 | } 326 | 327 | #main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) toolbaritem #PanelUI-menu-button:not(#nav-bar-overflow-button):not(#PlacesChevron) > :-moz-any(.toolbarbutton-icon,.toolbarbutton-badge-stack), 328 | #main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) #PanelUI-menu-button:not([type="menu-button"]):not(#nav-bar-overflow-button):not(#PlacesChevron) > :-moz-any(.toolbarbutton-icon,.toolbarbutton-badge-stack) { 329 | opacity: 1.0 !important; 330 | margin-bottom: unset !important; 331 | } 332 | 333 | /* support for tab title in Firefox titlebar option*/ 334 | #main-window[tabsintitlebar]::after { 335 | -moz-margin-start: 45px !important; 336 | } 337 | 338 | /* remove this nonsense button, a menuitem is inside menu button anyways */ 339 | #PanelUI-button #whats-new-menu-button { 340 | display: none !important; 341 | } 342 | 343 | /* workaround for Firefox 71+ *******************/ 344 | #main-window[tabsintitlebar] #PanelUI-button > *:not(#PanelUI-menu-button) { 345 | display: none !important; 346 | } 347 | 348 | #main-window[tabsintitlebar][uidensity=compact] #PanelUI-menu-button .toolbarbutton-badge-stack, 349 | #main-window[tabsintitlebar]:not([uidensity=compact]):not([uidensity=touch]) #PanelUI-menu-button .toolbarbutton-badge-stack, 350 | #main-window[tabsintitlebar][uidensity=touch] #PanelUI-menu-button .toolbarbutton-badge-stack, 351 | #main-window[tabsintitlebar][uidensity=compact] #PanelUI-menu-button .toolbarbutton-icon, 352 | #main-window[tabsintitlebar]:not([uidensity=compact]):not([uidensity=touch]) #PanelUI-menu-button .toolbarbutton-icon, 353 | #main-window[tabsintitlebar][uidensity=touch] #PanelUI-menu-button .toolbarbutton-icon { 354 | /*width: unset !important;*/ 355 | height: unset !important; 356 | } 357 | 358 | -------------------------------------------------------------------------------- /resources/Mozilla Public License: -------------------------------------------------------------------------------- 1 | 2 | Mozilla Public License 3 | Version 2.0 4 | 5 | 6 | 1. Definitions 7 | 8 | 1.1. “Contributor” 9 | 10 | means each individual or legal entity that creates, contributes to 11 | the creation of, or owns Covered Software. 12 | 13 | 1.2. “Contributor Version” 14 | 15 | means the combination of the Contributions of others (if any) used 16 | by a Contributor and that particular Contributor’s Contribution. 17 | 18 | 1.3. “Contribution” 19 | 20 | means Covered Software of a particular Contributor. 21 | 22 | 1.4. “Covered Software” 23 | 24 | means Source Code Form to which the initial Contributor has attached 25 | the notice in Exhibit A, the Executable Form of such Source Code 26 | Form, and Modifications of such Source Code Form, in each case 27 | including portions thereof. 28 | 29 | 1.5. “Incompatible With Secondary Licenses” 30 | 31 | means 32 | 33 | 1. 34 | 35 | that the initial Contributor has attached the notice described 36 | in Exhibit B to the Covered Software; or 37 | 38 | 2. 39 | 40 | that the Covered Software was made available under the terms of 41 | version 1.1 or earlier of the License, but not also under the 42 | terms of a Secondary License. 43 | 44 | 1.6. “Executable Form” 45 | 46 | means any form of the work other than Source Code Form. 47 | 48 | 1.7. “Larger Work” 49 | 50 | means a work that combines Covered Software with other material, in 51 | a separate file or files, that is not Covered Software. 52 | 53 | 1.8. “License” 54 | 55 | means this document. 56 | 57 | 1.9. “Licensable” 58 | 59 | means having the right to grant, to the maximum extent possible, 60 | whether at the time of the initial grant or subsequently, any and 61 | all of the rights conveyed by this License. 62 | 63 | 1.10. “Modifications” 64 | 65 | means any of the following: 66 | 67 | 1. 68 | 69 | any file in Source Code Form that results from an addition to, 70 | deletion from, or modification of the contents of Covered 71 | Software; or 72 | 73 | 2. 74 | 75 | any new file in Source Code Form that contains any Covered Software. 76 | 77 | 1.11. “Patent Claims” of a Contributor 78 | 79 | means any patent claim(s), including without limitation, method, 80 | process, and apparatus claims, in any patent Licensable by such 81 | Contributor that would be infringed, but for the grant of the 82 | License, by the making, using, selling, offering for sale, having 83 | made, import, or transfer of either its Contributions or its 84 | Contributor Version. 85 | 86 | 1.12. “Secondary License” 87 | 88 | means either the GNU General Public License, Version 2.0, the GNU 89 | Lesser General Public License, Version 2.1, the GNU Affero General 90 | Public License, Version 3.0, or any later versions of those licenses. 91 | 92 | 1.13. “Source Code Form” 93 | 94 | means the form of the work preferred for making modifications. 95 | 96 | 1.14. “You” (or “Your”) 97 | 98 | means an individual or a legal entity exercising rights under this 99 | License. For legal entities, “You” includes any entity that 100 | controls, is controlled by, or is under common control with You. For 101 | purposes of this definition, “control” means (a) the power, direct 102 | or indirect, to cause the direction or management of such entity, 103 | whether by contract or otherwise, or (b) ownership of more than 104 | fifty percent (50%) of the outstanding shares or beneficial 105 | ownership of such entity. 106 | 107 | 108 | 2. License Grants and Conditions 109 | 110 | 111 | 2.1. Grants 112 | 113 | Each Contributor hereby grants You a world-wide, royalty-free, 114 | non-exclusive license: 115 | 116 | 1. 117 | 118 | under intellectual property rights (other than patent or trademark) 119 | Licensable by such Contributor to use, reproduce, make available, 120 | modify, display, perform, distribute, and otherwise exploit its 121 | Contributions, either on an unmodified basis, with Modifications, or 122 | as part of a Larger Work; and 123 | 124 | 2. 125 | 126 | under Patent Claims of such Contributor to make, use, sell, offer 127 | for sale, have made, import, and otherwise transfer either its 128 | Contributions or its Contributor Version. 129 | 130 | 131 | 2.2. Effective Date 132 | 133 | The licenses granted in Section 2.1 with respect to any Contribution 134 | become effective for each Contribution on the date the Contributor first 135 | distributes such Contribution. 136 | 137 | 138 | 2.3. Limitations on Grant Scope 139 | 140 | The licenses granted in this Section 2 are the only rights granted under 141 | this License. No additional rights or licenses will be implied from the 142 | distribution or licensing of Covered Software under this License. 143 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 144 | Contributor: 145 | 146 | 1. 147 | 148 | for any code that a Contributor has removed from Covered Software; or 149 | 150 | 2. 151 | 152 | for infringements caused by: (i) Your and any other third party’s 153 | modifications of Covered Software, or (ii) the combination of its 154 | Contributions with other software (except as part of its Contributor 155 | Version); or 156 | 157 | 3. 158 | 159 | under Patent Claims infringed by Covered Software in the absence of 160 | its Contributions. 161 | 162 | This License does not grant any rights in the trademarks, service marks, 163 | or logos of any Contributor (except as may be necessary to comply with 164 | the notice requirements in Section 3.4). 165 | 166 | 167 | 2.4. Subsequent Licenses 168 | 169 | No Contributor makes additional grants as a result of Your choice to 170 | distribute the Covered Software under a subsequent version of this 171 | License (see Section 10.2) or under the terms of a Secondary License (if 172 | permitted under the terms of Section 3.3). 173 | 174 | 175 | 2.5. Representation 176 | 177 | Each Contributor represents that the Contributor believes its 178 | Contributions are its original creation(s) or it has sufficient rights 179 | to grant the rights to its Contributions conveyed by this License. 180 | 181 | 182 | 2.6. Fair Use 183 | 184 | This License is not intended to limit any rights You have under 185 | applicable copyright doctrines of fair use, fair dealing, or other 186 | equivalents. 187 | 188 | 189 | 2.7. Conditions 190 | 191 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 192 | in Section 2.1. 193 | 194 | 195 | 3. Responsibilities 196 | 197 | 198 | 3.1. Distribution of Source Form 199 | 200 | All distribution of Covered Software in Source Code Form, including any 201 | Modifications that You create or to which You contribute, must be under 202 | the terms of this License. You must inform recipients that the Source 203 | Code Form of the Covered Software is governed by the terms of this 204 | License, and how they can obtain a copy of this License. You may not 205 | attempt to alter or restrict the recipients’ rights in the Source Code Form. 206 | 207 | 208 | 3.2. Distribution of Executable Form 209 | 210 | If You distribute Covered Software in Executable Form then: 211 | 212 | 1. 213 | 214 | such Covered Software must also be made available in Source Code 215 | Form, as described in Section 3.1, and You must inform recipients of 216 | the Executable Form how they can obtain a copy of such Source Code 217 | Form by reasonable means in a timely manner, at a charge no more 218 | than the cost of distribution to the recipient; and 219 | 220 | 2. 221 | 222 | You may distribute such Executable Form under the terms of this 223 | License, or sublicense it under different terms, provided that the 224 | license for the Executable Form does not attempt to limit or alter 225 | the recipients’ rights in the Source Code Form under this License. 226 | 227 | 228 | 3.3. Distribution of a Larger Work 229 | 230 | You may create and distribute a Larger Work under terms of Your choice, 231 | provided that You also comply with the requirements of this License for 232 | the Covered Software. If the Larger Work is a combination of Covered 233 | Software with a work governed by one or more Secondary Licenses, and the 234 | Covered Software is not Incompatible With Secondary Licenses, this 235 | License permits You to additionally distribute such Covered Software 236 | under the terms of such Secondary License(s), so that the recipient of 237 | the Larger Work may, at their option, further distribute the Covered 238 | Software under the terms of either this License or such Secondary 239 | License(s). 240 | 241 | 242 | 3.4. Notices 243 | 244 | You may not remove or alter the substance of any license notices 245 | (including copyright notices, patent notices, disclaimers of warranty, 246 | or limitations of liability) contained within the Source Code Form of 247 | the Covered Software, except that You may alter any license notices to 248 | the extent required to remedy known factual inaccuracies. 249 | 250 | 251 | 3.5. Application of Additional Terms 252 | 253 | You may choose to offer, and to charge a fee for, warranty, support, 254 | indemnity or liability obligations to one or more recipients of Covered 255 | Software. However, You may do so only on Your own behalf, and not on 256 | behalf of any Contributor. You must make it absolutely clear that any 257 | such warranty, support, indemnity, or liability obligation is offered by 258 | You alone, and You hereby agree to indemnify every Contributor for any 259 | liability incurred by such Contributor as a result of warranty, support, 260 | indemnity or liability terms You offer. You may include additional 261 | disclaimers of warranty and limitations of liability specific to any 262 | jurisdiction. 263 | 264 | 265 | 4. Inability to Comply Due to Statute or Regulation 266 | 267 | If it is impossible for You to comply with any of the terms of this 268 | License with respect to some or all of the Covered Software due to 269 | statute, judicial order, or regulation then You must: (a) comply with 270 | the terms of this License to the maximum extent possible; and (b) 271 | describe the limitations and the code they affect. Such description must 272 | be placed in a text file included with all distributions of the Covered 273 | Software under this License. Except to the extent prohibited by statute 274 | or regulation, such description must be sufficiently detailed for a 275 | recipient of ordinary skill to be able to understand it. 276 | 277 | 278 | 5. Termination 279 | 280 | 5.1. The rights granted under this License will terminate automatically 281 | if You fail to comply with any of its terms. However, if You become 282 | compliant, then the rights granted under this License from a particular 283 | Contributor are reinstated (a) provisionally, unless and until such 284 | Contributor explicitly and finally terminates Your grants, and (b) on an 285 | ongoing basis, if such Contributor fails to notify You of the 286 | non-compliance by some reasonable means prior to 60 days after You have 287 | come back into compliance. Moreover, Your grants from a particular 288 | Contributor are reinstated on an ongoing basis if such Contributor 289 | notifies You of the non-compliance by some reasonable means, this is the 290 | first time You have received notice of non-compliance with this License 291 | from such Contributor, and You become compliant prior to 30 days after 292 | Your receipt of the notice. 293 | 294 | 5.2. If You initiate litigation against any entity by asserting a patent 295 | infringement claim (excluding declaratory judgment actions, 296 | counter-claims, and cross-claims) alleging that a Contributor Version 297 | directly or indirectly infringes any patent, then the rights granted to 298 | You by any and all Contributors for the Covered Software under 299 | Section 2.1 of this License shall terminate. 300 | 301 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 302 | end user license agreements (excluding distributors and resellers) which 303 | have been validly granted by You or Your distributors under this License 304 | prior to termination shall survive termination. 305 | 306 | 307 | 6. Disclaimer of Warranty 308 | 309 | /Covered Software is provided under this License on an “as is” basis, 310 | without warranty of any kind, either expressed, implied, or statutory, 311 | including, without limitation, warranties that the Covered Software is 312 | free of defects, merchantable, fit for a particular purpose or 313 | non-infringing. The entire risk as to the quality and performance of the 314 | Covered Software is with You. Should any Covered Software prove 315 | defective in any respect, You (not any Contributor) assume the cost of 316 | any necessary servicing, repair, or correction. This disclaimer of 317 | warranty constitutes an essential part of this License. No use of any 318 | Covered Software is authorized under this License except under this 319 | disclaimer. 320 | 321 | / 322 | 323 | 324 | 7. Limitation of Liability 325 | 326 | /Under no circumstances and under no legal theory, whether tort 327 | (including negligence), contract, or otherwise, shall any Contributor, 328 | or anyone who distributes Covered Software as permitted above, be liable 329 | to You for any direct, indirect, special, incidental, or consequential 330 | damages of any character including, without limitation, damages for lost 331 | profits, loss of goodwill, work stoppage, computer failure or 332 | malfunction, or any and all other commercial damages or losses, even if 333 | such party shall have been informed of the possibility of such damages. 334 | This limitation of liability shall not apply to liability for death or 335 | personal injury resulting from such party’s negligence to the extent 336 | applicable law prohibits such limitation. Some jurisdictions do not 337 | allow the exclusion or limitation of incidental or consequential 338 | damages, so this exclusion and limitation may not apply to You. 339 | 340 | / 341 | 342 | 343 | 8. Litigation 344 | 345 | Any litigation relating to this License may be brought only in the 346 | courts of a jurisdiction where the defendant maintains its principal 347 | place of business and such litigation shall be governed by laws of that 348 | jurisdiction, without reference to its conflict-of-law provisions. 349 | Nothing in this Section shall prevent a party’s ability to bring 350 | cross-claims or counter-claims. 351 | 352 | 353 | 9. Miscellaneous 354 | 355 | This License represents the complete agreement concerning the subject 356 | matter hereof. If any provision of this License is held to be 357 | unenforceable, such provision shall be reformed only to the extent 358 | necessary to make it enforceable. Any law or regulation which provides 359 | that the language of a contract shall be construed against the drafter 360 | shall not be used to construe this License against a Contributor. 361 | 362 | 363 | 10. Versions of the License 364 | 365 | 366 | 10.1. New Versions 367 | 368 | Mozilla Foundation is the license steward. Except as provided in 369 | Section 10.3, no one other than the license steward has the right to 370 | modify or publish new versions of this License. Each version will be 371 | given a distinguishing version number. 372 | 373 | 374 | 10.2. Effect of New Versions 375 | 376 | You may distribute the Covered Software under the terms of the version 377 | of the License under which You originally received the Covered Software, 378 | or under the terms of any subsequent version published by the license 379 | steward. 380 | 381 | 382 | 10.3. Modified Versions 383 | 384 | If you create software not governed by this License, and you want to 385 | create a new license for such software, you may create and use a 386 | modified version of this License if you rename the license and remove 387 | any references to the name of the license steward (except to note that 388 | such modified license differs from this License). 389 | 390 | 391 | 10.4. Distributing Source Code Form that is Incompatible With 392 | Secondary Licenses 393 | 394 | If You choose to distribute Source Code Form that is Incompatible With 395 | Secondary Licenses under the terms of this version of the License, the 396 | notice described in Exhibit B of this License must be attached. 397 | 398 | 399 | Exhibit A - Source Code Form License Notice 400 | 401 | This Source Code Form is subject to the terms of the Mozilla Public 402 | License, v. 2.0. If a copy of the MPL was not distributed with this 403 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 404 | 405 | If it is not possible or desirable to put the notice in a particular 406 | file, then You may include the notice in a location (such as a LICENSE 407 | file in a relevant directory) where a recipient would be likely to look 408 | for such a notice. 409 | 410 | You may add additional accurate notices of copyright ownership. 411 | 412 | 413 | Exhibit B - “Incompatible With Secondary Licenses” Notice 414 | 415 | This Source Code Form is “Incompatible With Secondary Licenses”, as 416 | defined by the Mozilla Public License, v. 2.0. 417 | 418 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Attribution-NonCommercial-ShareAlike 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International 58 | Public License 59 | 60 | By exercising the Licensed Rights (defined below), You accept and agree 61 | to be bound by the terms and conditions of this Creative Commons 62 | Attribution-NonCommercial-ShareAlike 4.0 International Public License 63 | ("Public License"). To the extent this Public License may be 64 | interpreted as a contract, You are granted the Licensed Rights in 65 | consideration of Your acceptance of these terms and conditions, and the 66 | Licensor grants You such rights in consideration of benefits the 67 | Licensor receives from making the Licensed Material available under 68 | these terms and conditions. 69 | 70 | 71 | Section 1 -- Definitions. 72 | 73 | a. Adapted Material means material subject to Copyright and Similar 74 | Rights that is derived from or based upon the Licensed Material 75 | and in which the Licensed Material is translated, altered, 76 | arranged, transformed, or otherwise modified in a manner requiring 77 | permission under the Copyright and Similar Rights held by the 78 | Licensor. For purposes of this Public License, where the Licensed 79 | Material is a musical work, performance, or sound recording, 80 | Adapted Material is always produced where the Licensed Material is 81 | synched in timed relation with a moving image. 82 | 83 | b. Adapter's License means the license You apply to Your Copyright 84 | and Similar Rights in Your contributions to Adapted Material in 85 | accordance with the terms and conditions of this Public License. 86 | 87 | c. BY-NC-SA Compatible License means a license listed at 88 | creativecommons.org/compatiblelicenses, approved by Creative 89 | Commons as essentially the equivalent of this Public License. 90 | 91 | d. Copyright and Similar Rights means copyright and/or similar rights 92 | closely related to copyright including, without limitation, 93 | performance, broadcast, sound recording, and Sui Generis Database 94 | Rights, without regard to how the rights are labeled or 95 | categorized. For purposes of this Public License, the rights 96 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 97 | Rights. 98 | 99 | e. Effective Technological Measures means those measures that, in the 100 | absence of proper authority, may not be circumvented under laws 101 | fulfilling obligations under Article 11 of the WIPO Copyright 102 | Treaty adopted on December 20, 1996, and/or similar international 103 | agreements. 104 | 105 | f. Exceptions and Limitations means fair use, fair dealing, and/or 106 | any other exception or limitation to Copyright and Similar Rights 107 | that applies to Your use of the Licensed Material. 108 | 109 | g. License Elements means the license attributes listed in the name 110 | of a Creative Commons Public License. The License Elements of this 111 | Public License are Attribution, NonCommercial, and ShareAlike. 112 | 113 | h. Licensed Material means the artistic or literary work, database, 114 | or other material to which the Licensor applied this Public 115 | License. 116 | 117 | i. Licensed Rights means the rights granted to You subject to the 118 | terms and conditions of this Public License, which are limited to 119 | all Copyright and Similar Rights that apply to Your use of the 120 | Licensed Material and that the Licensor has authority to license. 121 | 122 | j. Licensor means the individual(s) or entity(ies) granting rights 123 | under this Public License. 124 | 125 | k. NonCommercial means not primarily intended for or directed towards 126 | commercial advantage or monetary compensation. For purposes of 127 | this Public License, the exchange of the Licensed Material for 128 | other material subject to Copyright and Similar Rights by digital 129 | file-sharing or similar means is NonCommercial provided there is 130 | no payment of monetary compensation in connection with the 131 | exchange. 132 | 133 | l. Share means to provide material to the public by any means or 134 | process that requires permission under the Licensed Rights, such 135 | as reproduction, public display, public performance, distribution, 136 | dissemination, communication, or importation, and to make material 137 | available to the public including in ways that members of the 138 | public may access the material from a place and at a time 139 | individually chosen by them. 140 | 141 | m. Sui Generis Database Rights means rights other than copyright 142 | resulting from Directive 96/9/EC of the European Parliament and of 143 | the Council of 11 March 1996 on the legal protection of databases, 144 | as amended and/or succeeded, as well as other essentially 145 | equivalent rights anywhere in the world. 146 | 147 | n. You means the individual or entity exercising the Licensed Rights 148 | under this Public License. Your has a corresponding meaning. 149 | 150 | 151 | Section 2 -- Scope. 152 | 153 | a. License grant. 154 | 155 | 1. Subject to the terms and conditions of this Public License, 156 | the Licensor hereby grants You a worldwide, royalty-free, 157 | non-sublicensable, non-exclusive, irrevocable license to 158 | exercise the Licensed Rights in the Licensed Material to: 159 | 160 | a. reproduce and Share the Licensed Material, in whole or 161 | in part, for NonCommercial purposes only; and 162 | 163 | b. produce, reproduce, and Share Adapted Material for 164 | NonCommercial purposes only. 165 | 166 | 2. Exceptions and Limitations. For the avoidance of doubt, where 167 | Exceptions and Limitations apply to Your use, this Public 168 | License does not apply, and You do not need to comply with 169 | its terms and conditions. 170 | 171 | 3. Term. The term of this Public License is specified in Section 172 | 6(a). 173 | 174 | 4. Media and formats; technical modifications allowed. The 175 | Licensor authorizes You to exercise the Licensed Rights in 176 | all media and formats whether now known or hereafter created, 177 | and to make technical modifications necessary to do so. The 178 | Licensor waives and/or agrees not to assert any right or 179 | authority to forbid You from making technical modifications 180 | necessary to exercise the Licensed Rights, including 181 | technical modifications necessary to circumvent Effective 182 | Technological Measures. For purposes of this Public License, 183 | simply making modifications authorized by this Section 2(a) 184 | (4) never produces Adapted Material. 185 | 186 | 5. Downstream recipients. 187 | 188 | a. Offer from the Licensor -- Licensed Material. Every 189 | recipient of the Licensed Material automatically 190 | receives an offer from the Licensor to exercise the 191 | Licensed Rights under the terms and conditions of this 192 | Public License. 193 | 194 | b. Additional offer from the Licensor -- Adapted Material. 195 | Every recipient of Adapted Material from You 196 | automatically receives an offer from the Licensor to 197 | exercise the Licensed Rights in the Adapted Material 198 | under the conditions of the Adapter's License You apply. 199 | 200 | c. No downstream restrictions. You may not offer or impose 201 | any additional or different terms or conditions on, or 202 | apply any Effective Technological Measures to, the 203 | Licensed Material if doing so restricts exercise of the 204 | Licensed Rights by any recipient of the Licensed 205 | Material. 206 | 207 | 6. No endorsement. Nothing in this Public License constitutes or 208 | may be construed as permission to assert or imply that You 209 | are, or that Your use of the Licensed Material is, connected 210 | with, or sponsored, endorsed, or granted official status by, 211 | the Licensor or others designated to receive attribution as 212 | provided in Section 3(a)(1)(A)(i). 213 | 214 | b. Other rights. 215 | 216 | 1. Moral rights, such as the right of integrity, are not 217 | licensed under this Public License, nor are publicity, 218 | privacy, and/or other similar personality rights; however, to 219 | the extent possible, the Licensor waives and/or agrees not to 220 | assert any such rights held by the Licensor to the limited 221 | extent necessary to allow You to exercise the Licensed 222 | Rights, but not otherwise. 223 | 224 | 2. Patent and trademark rights are not licensed under this 225 | Public License. 226 | 227 | 3. To the extent possible, the Licensor waives any right to 228 | collect royalties from You for the exercise of the Licensed 229 | Rights, whether directly or through a collecting society 230 | under any voluntary or waivable statutory or compulsory 231 | licensing scheme. In all other cases the Licensor expressly 232 | reserves any right to collect such royalties, including when 233 | the Licensed Material is used other than for NonCommercial 234 | purposes. 235 | 236 | 237 | Section 3 -- License Conditions. 238 | 239 | Your exercise of the Licensed Rights is expressly made subject to the 240 | following conditions. 241 | 242 | a. Attribution. 243 | 244 | 1. If You Share the Licensed Material (including in modified 245 | form), You must: 246 | 247 | a. retain the following if it is supplied by the Licensor 248 | with the Licensed Material: 249 | 250 | i. identification of the creator(s) of the Licensed 251 | Material and any others designated to receive 252 | attribution, in any reasonable manner requested by 253 | the Licensor (including by pseudonym if 254 | designated); 255 | 256 | ii. a copyright notice; 257 | 258 | iii. a notice that refers to this Public License; 259 | 260 | iv. a notice that refers to the disclaimer of 261 | warranties; 262 | 263 | v. a URI or hyperlink to the Licensed Material to the 264 | extent reasonably practicable; 265 | 266 | b. indicate if You modified the Licensed Material and 267 | retain an indication of any previous modifications; and 268 | 269 | c. indicate the Licensed Material is licensed under this 270 | Public License, and include the text of, or the URI or 271 | hyperlink to, this Public License. 272 | 273 | 2. You may satisfy the conditions in Section 3(a)(1) in any 274 | reasonable manner based on the medium, means, and context in 275 | which You Share the Licensed Material. For example, it may be 276 | reasonable to satisfy the conditions by providing a URI or 277 | hyperlink to a resource that includes the required 278 | information. 279 | 3. If requested by the Licensor, You must remove any of the 280 | information required by Section 3(a)(1)(A) to the extent 281 | reasonably practicable. 282 | 283 | b. ShareAlike. 284 | 285 | In addition to the conditions in Section 3(a), if You Share 286 | Adapted Material You produce, the following conditions also apply. 287 | 288 | 1. The Adapter's License You apply must be a Creative Commons 289 | license with the same License Elements, this version or 290 | later, or a BY-NC-SA Compatible License. 291 | 292 | 2. You must include the text of, or the URI or hyperlink to, the 293 | Adapter's License You apply. You may satisfy this condition 294 | in any reasonable manner based on the medium, means, and 295 | context in which You Share Adapted Material. 296 | 297 | 3. You may not offer or impose any additional or different terms 298 | or conditions on, or apply any Effective Technological 299 | Measures to, Adapted Material that restrict exercise of the 300 | rights granted under the Adapter's License You apply. 301 | 302 | 303 | Section 4 -- Sui Generis Database Rights. 304 | 305 | Where the Licensed Rights include Sui Generis Database Rights that 306 | apply to Your use of the Licensed Material: 307 | 308 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 309 | to extract, reuse, reproduce, and Share all or a substantial 310 | portion of the contents of the database for NonCommercial purposes 311 | only; 312 | 313 | b. if You include all or a substantial portion of the database 314 | contents in a database in which You have Sui Generis Database 315 | Rights, then the database in which You have Sui Generis Database 316 | Rights (but not its individual contents) is Adapted Material, 317 | including for purposes of Section 3(b); and 318 | 319 | c. You must comply with the conditions in Section 3(a) if You Share 320 | all or a substantial portion of the contents of the database. 321 | 322 | For the avoidance of doubt, this Section 4 supplements and does not 323 | replace Your obligations under this Public License where the Licensed 324 | Rights include other Copyright and Similar Rights. 325 | 326 | 327 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 328 | 329 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 330 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 331 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 332 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 333 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 334 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 335 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 336 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 337 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 338 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 339 | 340 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 341 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 342 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 343 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 344 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 345 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 346 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 347 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 348 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 349 | 350 | c. The disclaimer of warranties and limitation of liability provided 351 | above shall be interpreted in a manner that, to the extent 352 | possible, most closely approximates an absolute disclaimer and 353 | waiver of all liability. 354 | 355 | 356 | Section 6 -- Term and Termination. 357 | 358 | a. This Public License applies for the term of the Copyright and 359 | Similar Rights licensed here. However, if You fail to comply with 360 | this Public License, then Your rights under this Public License 361 | terminate automatically. 362 | 363 | b. Where Your right to use the Licensed Material has terminated under 364 | Section 6(a), it reinstates: 365 | 366 | 1. automatically as of the date the violation is cured, provided 367 | it is cured within 30 days of Your discovery of the 368 | violation; or 369 | 370 | 2. upon express reinstatement by the Licensor. 371 | 372 | For the avoidance of doubt, this Section 6(b) does not affect any 373 | right the Licensor may have to seek remedies for Your violations 374 | of this Public License. 375 | 376 | c. For the avoidance of doubt, the Licensor may also offer the 377 | Licensed Material under separate terms or conditions or stop 378 | distributing the Licensed Material at any time; however, doing so 379 | will not terminate this Public License. 380 | 381 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 382 | License. 383 | 384 | 385 | Section 7 -- Other Terms and Conditions. 386 | 387 | a. The Licensor shall not be bound by any additional or different 388 | terms or conditions communicated by You unless expressly agreed. 389 | 390 | b. Any arrangements, understandings, or agreements regarding the 391 | Licensed Material not stated herein are separate from and 392 | independent of the terms and conditions of this Public License. 393 | 394 | 395 | Section 8 -- Interpretation. 396 | 397 | a. For the avoidance of doubt, this Public License does not, and 398 | shall not be interpreted to, reduce, limit, restrict, or impose 399 | conditions on any use of the Licensed Material that could lawfully 400 | be made without permission under this Public License. 401 | 402 | b. To the extent possible, if any provision of this Public License is 403 | deemed unenforceable, it shall be automatically reformed to the 404 | minimum extent necessary to make it enforceable. If the provision 405 | cannot be reformed, it shall be severed from this Public License 406 | without affecting the enforceability of the remaining terms and 407 | conditions. 408 | 409 | c. No term or condition of this Public License will be waived and no 410 | failure to comply consented to unless expressly agreed to by the 411 | Licensor. 412 | 413 | d. Nothing in this Public License constitutes or may be interpreted 414 | as a limitation upon, or waiver of, any privileges and immunities 415 | that apply to the Licensor or You, including from the legal 416 | processes of any jurisdiction or authority. 417 | 418 | ======================================================================= 419 | 420 | Creative Commons is not a party to its public 421 | licenses. Notwithstanding, Creative Commons may elect to apply one of 422 | its public licenses to material it publishes and in those instances 423 | will be considered the “Licensor.” The text of the Creative Commons 424 | public licenses is dedicated to the public domain under the CC0 Public 425 | Domain Dedication. Except for the limited purpose of indicating that 426 | material is shared under a Creative Commons public license or as 427 | otherwise permitted by the Creative Commons policies published at 428 | creativecommons.org/policies, Creative Commons does not authorize the 429 | use of the trademark "Creative Commons" or any other trademark or logo 430 | of Creative Commons without its prior written consent including, 431 | without limitation, in connection with any unauthorized modifications 432 | to any of its public licenses or any other arrangements, 433 | understandings, or agreements concerning use of licensed material. For 434 | the avoidance of doubt, this paragraph does not form part of the 435 | public licenses. 436 | 437 | Creative Commons may be contacted at creativecommons.org. 438 | -------------------------------------------------------------------------------- /utils/boot.jsm: -------------------------------------------------------------------------------- 1 | let EXPORTED_SYMBOLS = []; 2 | 3 | console.warn( "Browser is executing custom scripts via autoconfig" ); 4 | const {Services} = ChromeUtils.import('resource://gre/modules/Services.jsm'); 5 | 6 | const yPref = { 7 | get: function (prefPath) { 8 | const sPrefs = Services.prefs; 9 | try { 10 | switch (sPrefs.getPrefType(prefPath)) { 11 | case 0: 12 | return undefined; 13 | case 32: 14 | return sPrefs.getStringPref(prefPath); 15 | case 64: 16 | return sPrefs.getIntPref(prefPath); 17 | case 128: 18 | return sPrefs.getBoolPref(prefPath); 19 | } 20 | } catch (ex) { 21 | return undefined; 22 | } 23 | return; 24 | }, 25 | set: function (prefPath, value) { 26 | const sPrefs = Services.prefs; 27 | switch (typeof value) { 28 | case 'string': 29 | return sPrefs.setCharPref(prefPath, value) || value; 30 | case 'number': 31 | return sPrefs.setIntPref(prefPath, value) || value; 32 | case 'boolean': 33 | return sPrefs.setBoolPref(prefPath, value) || value; 34 | } 35 | return; 36 | }, 37 | addListener:(a,b)=>{ let o = (q,w,e)=>(b(yPref.get(e),e)); Services.prefs.addObserver(a,o);return{pref:a,observer:o}}, 38 | removeListener:(a)=>( Services.prefs.removeObserver(a.pref,a.observer) ) 39 | }; 40 | 41 | const SHARED_GLOBAL = {}; 42 | Object.defineProperty(SHARED_GLOBAL,"widgetCallbacks",{value:new Map()}); 43 | 44 | function resolveChromeURL(str){ 45 | const registry = Cc["@mozilla.org/chrome/chrome-registry;1"].getService(Ci.nsIChromeRegistry); 46 | try{ 47 | return registry.convertChromeURL(Services.io.newURI(str.replace(/\\/g,"/"))).spec 48 | }catch(e){ 49 | console.error(e); 50 | return "" 51 | } 52 | } 53 | // relative to "chrome" folder 54 | function resolveChromePath(str){ 55 | let parts = resolveChromeURL(str).split("/"); 56 | return parts.slice(parts.indexOf("chrome") + 1,parts.length - 1).join("/"); 57 | } 58 | 59 | let _uc = { 60 | BROWSERCHROME: 'chrome://browser/content/browser.xhtml', 61 | PREF_ENABLED: 'userChromeJS.enabled', 62 | PREF_SCRIPTSDISABLED: 'userChromeJS.scriptsDisabled', 63 | 64 | SCRIPT_DIR: resolveChromePath('chrome://userscripts/content/'), 65 | RESOURCE_DIR: resolveChromePath('chrome://userchrome/content/'), 66 | BASE_FILEURI: Services.io.getProtocolHandler('file').QueryInterface(Ci.nsIFileProtocolHandler).getURLSpecFromDir(Services.dirsvc.get('UChrm',Ci.nsIFile)), 67 | 68 | SESSION_RESTORED: false, 69 | 70 | get chromeDir() {return Services.dirsvc.get('UChrm',Ci.nsIFile)}, 71 | 72 | getDirEntry: function(filename,isLoader = false){ 73 | filename = filename.replace("\\","/"); 74 | let pathParts = ((filename.startsWith("..") ? "" : (isLoader ? _uc.SCRIPT_DIR : _uc.RESOURCE_DIR)) + "/" + filename) 75 | .split("/").filter( (a) => (!!a && a != "..") ); 76 | let entry = _uc.chromeDir; 77 | 78 | for(let part of pathParts){ 79 | entry.append(part) 80 | } 81 | if(!entry.exists()){ 82 | return null 83 | } 84 | if(entry.isDirectory()){ 85 | return entry.directoryEntries.QueryInterface(Ci.nsISimpleEnumerator); 86 | }else if(entry.isFile()){ 87 | return entry 88 | }else{ 89 | return null 90 | } 91 | }, 92 | 93 | updateStyleSheet: function(name,type) { 94 | if(type){ 95 | let sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService); 96 | try{ 97 | let uri = Services.io.newURI(`chrome://userchrome/content/${name}`); 98 | switch(type){ 99 | case "agent": 100 | sss.unregisterSheet(uri,sss.AGENT_SHEET); 101 | sss.loadAndRegisterSheet(uri,sss.AGENT_SHEET); 102 | return true 103 | case "author": 104 | sss.unregisterSheet(uri,sss.AUTHOR_SHEET); 105 | sss.loadAndRegisterSheet(uri,sss.AUTHOR_SHEET); 106 | return true 107 | default: 108 | return false 109 | } 110 | }catch(e){ 111 | console.error(e); 112 | return false 113 | } 114 | } 115 | let entry = _uc.utils.getFSEntry(name); 116 | if(!(entry && entry.isFile())){ 117 | return false 118 | } 119 | let recentWindow = Services.wm.getMostRecentBrowserWindow(); 120 | if(!recentWindow){ 121 | return false 122 | } 123 | function recurseImports(sheet,all){ 124 | let z = 0; 125 | let rule = sheet.cssRules[0]; 126 | // loop through import rules and check that the "all" 127 | // doesn't already contain the same object 128 | while(rule instanceof CSSImportRule && !all.includes(rule.styleSheet) ){ 129 | all.push(rule.styleSheet); 130 | recurseImports(rule.styleSheet,all); 131 | rule = sheet.cssRules[++z]; 132 | } 133 | return all 134 | } 135 | 136 | let sheets = recentWindow.InspectorUtils.getAllStyleSheets(recentWindow.document,false); 137 | 138 | sheets = sheets.flatMap( x => recurseImports(x,[x]) ); 139 | 140 | // If a sheet is imported multiple times, then there will be 141 | // duplicates, because style system does create an object for 142 | // each instace but that's OK since sheets.find below will 143 | // only find the first instance and reload that which is 144 | // "probably" fine. 145 | let entryFilePath = `file:///${entry.path.replaceAll("\\","/")}`; 146 | 147 | let target = sheets.find(sheet => sheet.href === entryFilePath); 148 | if(target){ 149 | recentWindow.InspectorUtils.parseStyleSheet(target,_uc.utils.readFile(entry)); 150 | return true 151 | } 152 | return false 153 | }, 154 | 155 | getScripts: function () { 156 | this.scripts = {}; 157 | if(!yPref.get(_uc.PREF_ENABLED) || !(/^[\w_]*$/.test(_uc.SCRIPT_DIR))){ 158 | console.log("Scripts are disabled or the given script directory name is invalid"); 159 | return 160 | } 161 | let files = _uc.getDirEntry('',true); 162 | while(files.hasMoreElements()){ 163 | let file = files.getNext().QueryInterface(Ci.nsIFile); 164 | if (/\.uc\.js$/i.test(file.leafName)) { 165 | let script = _uc.getScriptData(file); 166 | if(script.inbackground && script.isEnabled){ 167 | try{ 168 | Cu.import(`chrome://userscripts/content/${script.filename}`) 169 | }catch(e){ 170 | console.error(e); 171 | } 172 | } 173 | } 174 | } 175 | }, 176 | 177 | getScriptData: function (aFile) { 178 | let header = (_uc.utils.readFile(aFile,true).match(/^\/\/ ==UserScript==\s*\n(?:.*\n)*?\/\/ ==\/UserScript==\s*\n/m) || [''])[0]; 179 | let match, rex = { 180 | include: [], 181 | exclude: [] 182 | }; 183 | let findNextRe = /^\/\/ @(include|exclude)\s+(.+)\s*$/gm; 184 | while ((match = findNextRe.exec(header))) { 185 | rex[match[1]].push(match[2].replace(/^main$/i, _uc.BROWSERCHROME).replace(/\*/g, '.*?')); 186 | } 187 | if (!rex.include.length) { 188 | rex.include.push(_uc.BROWSERCHROME); 189 | } 190 | let exclude = rex.exclude.length ? `(?!${rex.exclude.join('$|')}$)` : ''; 191 | let def = ['', '']; 192 | let author = (header.match(/\/\/ @author\s+(.+)\s*$/im) || def)[1]; 193 | let filename = aFile.leafName || ''; 194 | 195 | return this.scripts[filename] = { 196 | filename: filename, 197 | name: (header.match(/\/\/ @name\s+(.+)\s*$/im) || def)[1], 198 | charset: (header.match(/\/\/ @charset\s+(.+)\s*$/im) || def)[1], 199 | description: (header.match(/\/\/ @description\s+(.+)\s*$/im) || def)[1], 200 | version: (header.match(/\/\/ @version\s+(.+)\s*$/im) || def)[1], 201 | author: (header.match(/\/\/ @author\s+(.+)\s*$/im) || def)[1], 202 | regex: new RegExp(`^${exclude}(${rex.include.join('|') || '.*'})$`,'i'), 203 | id: (header.match(/\/\/ @id\s+(.+)\s*$/im) || ['', filename.split('.uc.js')[0] + '@' + (author || 'userChromeJS')])[1], 204 | homepageURL: (header.match(/\/\/ @homepageURL\s+(.+)\s*$/im) || def)[1], 205 | downloadURL: (header.match(/\/\/ @downloadURL\s+(.+)\s*$/im) || def)[1], 206 | updateURL: (header.match(/\/\/ @updateURL\s+(.+)\s*$/im) || def)[1], 207 | optionsURL: (header.match(/\/\/ @optionsURL\s+(.+)\s*$/im) || def)[1], 208 | startup: (header.match(/\/\/ @startup\s+(.+)\s*$/im) || def)[1], 209 | //shutdown: (header.match(/\/\/ @shutdown\s+(.+)\s*$/im) || def)[1], 210 | onlyonce: /\/\/ @onlyonce\b/.test(header), 211 | inbackground: /\/\/ @backgroundmodule\b/.test(header), 212 | isRunning: false, 213 | get isEnabled() { 214 | return (yPref.get(_uc.PREF_SCRIPTSDISABLED) || '').split(',').indexOf(this.filename) === -1; 215 | } 216 | } 217 | }, 218 | 219 | //everLoaded: [], 220 | 221 | maybeRunStartUp: (script,win) => { 222 | if( script.startup 223 | && (/^\w*$/).test(script.startup) 224 | && SHARED_GLOBAL[script.startup] 225 | && typeof SHARED_GLOBAL[script.startup]._startup === "function") 226 | { 227 | SHARED_GLOBAL[script.startup]._startup(win) 228 | } 229 | }, 230 | 231 | loadScript: function (script, win) { 232 | if (script.inbackground || !script.regex.test(win.location.href) || !script.isEnabled) { 233 | return 234 | } 235 | try { 236 | if (script.onlyonce && script.isRunning) { 237 | _uc.maybeRunStartUp(script,win) 238 | return 239 | } 240 | 241 | Services.scriptloader.loadSubScript(`chrome://userscripts/content/${script.filename}`, win); 242 | 243 | script.isRunning = true; 244 | _uc.maybeRunStartUp(script,win); 245 | 246 | /*if (!script.shutdown) { 247 | this.everLoaded.push(script.id); 248 | }*/ 249 | } catch (ex) { 250 | console.error(ex); 251 | } 252 | return 253 | }, 254 | 255 | // things to be exported for use by userscripts 256 | utils:{ 257 | 258 | get sharedGlobal(){ return SHARED_GLOBAL }, 259 | 260 | createElement: function(doc,tag,props,isHTML = false){ 261 | let el = isHTML ? doc.createElement(tag) : doc.createXULElement(tag); 262 | for(let prop in props){ 263 | el.setAttribute(prop,props[prop]) 264 | } 265 | return el 266 | }, 267 | 268 | createWidget(desc){ 269 | if(!desc || !desc.id ){ 270 | console.error("custom widget description is missing 'id' property"); 271 | return null 272 | } 273 | if(!(['toolbaritem','toolbarbutton']).includes(desc.type)){ 274 | console.error("custom widget has unsupported type: "+desc.type); 275 | return null 276 | } 277 | const CUI = Services.wm.getMostRecentBrowserWindow().CustomizableUI; 278 | let newWidget = CUI.getWidget(desc.id); 279 | 280 | if(newWidget && newWidget.hasOwnProperty("source")){ 281 | // very likely means that the widget with this id already exists 282 | // There isn't a very reliable way to 'really' check if it exists or not 283 | return newWidget 284 | } 285 | // This is pretty ugly but makes onBuild much cleaner. 286 | let itemStyle = ""; 287 | if(desc.image){ 288 | if(desc.type==="toolbarbutton"){ 289 | itemStyle += "list-style-image:"; 290 | }else{ 291 | itemStyle += "background: transparent center no-repeat "; 292 | } 293 | itemStyle += `url(chrome://userChrome/content/${desc.image});`; 294 | itemStyle += desc.style || ""; 295 | } 296 | SHARED_GLOBAL.widgetCallbacks.set(desc.id,desc.callback); 297 | 298 | return CUI.createWidget({ 299 | id: desc.id, 300 | type: 'custom', 301 | onBuild: function(aDocument) { 302 | let toolbaritem = aDocument.createXULElement(desc.type); 303 | let props = { 304 | id: desc.id, 305 | class: `toolbarbutton-1 chromeclass-toolbar-additional ${desc.class?desc.class:""}`, 306 | label: desc.label || desc.id, 307 | tooltiptext: desc.tooltip || desc.id, 308 | style: itemStyle, 309 | onclick: `${desc.allEvents?"":"event.button===0 && "}_ucUtils.sharedGlobal.widgetCallbacks.get(this.id)(event,window)` 310 | }; 311 | for (let p in props){ 312 | toolbaritem.setAttribute(p, props[p]); 313 | } 314 | return toolbaritem; 315 | } 316 | }); 317 | }, 318 | 319 | readFile: function (aFile, metaOnly = false) { 320 | let stream = Cc['@mozilla.org/network/file-input-stream;1'].createInstance(Ci.nsIFileInputStream); 321 | let cvstream = Cc['@mozilla.org/intl/converter-input-stream;1'].createInstance(Ci.nsIConverterInputStream); 322 | try{ 323 | stream.init(aFile, 0x01, 0, 0); 324 | cvstream.init(stream, 'UTF-8', 1024, Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER); 325 | }catch(e){ 326 | console.error(e); 327 | return null 328 | } 329 | let content = '', 330 | data = {}; 331 | while (cvstream.readString(4096, data)) { 332 | content += data.value; 333 | if (metaOnly && content.indexOf('// ==/UserScript==') > 0) { 334 | break; 335 | } 336 | } 337 | cvstream.close(); 338 | stream.close(); 339 | return content.replace(/\r\n?/g, '\n'); 340 | }, 341 | 342 | createFileURI: (fileName = "") => { 343 | fileName = String(fileName); 344 | let u = resolveChromeURL(`chrome://userchrome/content/${fileName}`); 345 | return fileName ? u : u.substr(0,u.lastIndexOf("/") + 1); 346 | }, 347 | 348 | get chromeDir(){ return {get files(){return _uc.chromeDir.directoryEntries.QueryInterface(Ci.nsISimpleEnumerator)},uri:_uc.BASE_FILEURI} }, 349 | 350 | getFSEntry: (fileName) => ( _uc.getDirEntry(fileName) ), 351 | 352 | getScriptData: () => { 353 | let scripts = []; 354 | for(let script in _uc.scripts){ 355 | let data = {}; 356 | let o = _uc.scripts[script]; 357 | for(let p in o){ 358 | if(p != "isEnabled"){ 359 | data[p] = o[p]; 360 | } 361 | } 362 | scripts.push(data) 363 | } 364 | return scripts 365 | }, 366 | 367 | get windows(){ 368 | return { 369 | get: function (onlyBrowsers = true) { 370 | let windows = Services.wm.getEnumerator(onlyBrowsers ? 'navigator:browser' : null); 371 | let wins = []; 372 | while (windows.hasMoreElements()) { 373 | wins.push(windows.getNext()); 374 | } 375 | return wins 376 | }, 377 | forEach: function(fun,onlyBrowsers = true){ 378 | let wins = this.get(onlyBrowsers); 379 | wins.forEach((w)=>(fun(w.document,w))) 380 | } 381 | } 382 | }, 383 | 384 | toggleScript: function(el){ 385 | let isElement = !!el.tagName; 386 | if(!isElement && typeof el != "string"){ 387 | return 388 | } 389 | let script = _uc.scripts[isElement ? el.getAttribute("filename") : el]; 390 | if(!script){ 391 | console.log("no script to toggle"); 392 | return 393 | } 394 | if (script.isEnabled) { 395 | yPref.set(_uc.PREF_SCRIPTSDISABLED, `${script.filename},${yPref.get(_uc.PREF_SCRIPTSDISABLED)}`); 396 | } else { 397 | yPref.set(_uc.PREF_SCRIPTSDISABLED, yPref.get(_uc.PREF_SCRIPTSDISABLED).replace(new RegExp(`^${script.filename},?|,${script.filename}`), '')); 398 | } 399 | Services.appinfo.invalidateCachesOnRestart(); 400 | }, 401 | 402 | updateStyleSheet: function(name = "../userChrome.css",type){ 403 | return _uc.updateStyleSheet(name,type) 404 | }, 405 | 406 | updateMenuStatus: function(menu){ 407 | if(!menu){ 408 | return 409 | } 410 | let disabledScripts = yPref.get(_uc.PREF_SCRIPTSDISABLED).split(","); 411 | for(let item of menu.children){ 412 | if (disabledScripts.includes(item.getAttribute("filename"))){ 413 | item.removeAttribute("checked"); 414 | }else{ 415 | item.setAttribute("checked","true"); 416 | } 417 | } 418 | }, 419 | 420 | startupFinished: function(){ 421 | return new Promise(resolve => { 422 | if(_uc.SESSION_RESTORED){ 423 | resolve(); 424 | } 425 | let observer = (subject, topic, data) => { 426 | Services.obs.removeObserver(observer, "sessionstore-windows-restored"); 427 | resolve(); 428 | }; 429 | Services.obs.addObserver(observer, "sessionstore-windows-restored"); 430 | }); 431 | }, 432 | 433 | windowIsReady: function(win){ 434 | if(win && win.isChromeWindow){ 435 | return new Promise(resolve => { 436 | if(win.gBrowserInit.delayedStartupFinished){ 437 | resolve() 438 | } 439 | let observer = (subject, topic, data) => { 440 | if(subject === win){ 441 | Services.obs.removeObserver(observer, "browser-delayed-startup-finished"); 442 | resolve(); 443 | } 444 | }; 445 | Services.obs.addObserver(observer, "browser-delayed-startup-finished"); 446 | }); 447 | }else{ 448 | return Promise.reject(new Error("reference is not a window")) 449 | } 450 | }, 451 | 452 | registerHotkey: function(desc,func){ 453 | const validMods = ["accel","alt","ctrl","meta","shift"]; 454 | const validKey = (k)=>((/^[\w-]$/).test(k) ? 1 : (/^F(?:1[0,2]|[1-9])$/).test(k) ? 2 : 0); 455 | const NOK = (a) => (typeof a != "string"); 456 | const eToO = (e) => ({"metaKey":e.metaKey,"ctrlKey":e.ctrlKey,"altKey":e.altKey,"shiftKey":e.shiftKey,"key":e.srcElement.getAttribute("key"),"id":e.srcElement.getAttribute("id")}); 457 | 458 | if(NOK(desc.id) || NOK(desc.key) || NOK(desc.modifiers)){ 459 | return false 460 | } 461 | 462 | try{ 463 | let mods = desc.modifiers.toLowerCase().split(" ").filter((a)=>(validMods.includes(a))); 464 | let key = validKey(desc.key); 465 | if(!key || (mods.length === 0 && key === 1)){ 466 | return false 467 | } 468 | 469 | _uc.utils.windows.forEach((doc,win) => { 470 | if(doc.getElementById(desc.id)){ 471 | return 472 | } 473 | let details = { "id": desc.id, "modifiers": mods.join(",").replace("ctrl","accel"), "oncommand": "//" }; 474 | if(key === 1){ 475 | details.key = desc.key.toUpperCase(); 476 | }else{ 477 | details.keycode = `VK_${desc.key}`; 478 | } 479 | 480 | let el = _uc.utils.createElement(doc,"key",details); 481 | 482 | el.addEventListener("command",(ev) => {func(ev.target.ownerGlobal,eToO(ev))}); 483 | let keyset = doc.getElementById("mainKeyset") || doc.body.appendChild(_uc.utils.createElement(doc,"keyset",{id:"ucKeys"})); 484 | keyset.insertBefore(el,keyset.firstChild); 485 | }); 486 | }catch(e){ 487 | console.error(e); 488 | return false 489 | } 490 | return true 491 | }, 492 | loadURI: function(win,desc){ 493 | if( !win 494 | || !desc 495 | || !desc.url 496 | || typeof desc.url !== "string" 497 | || !(["tab","tabshifted","window","current"]).includes(desc.where) 498 | ){ 499 | return false 500 | } 501 | const isJsURI = desc.url.slice(0,11) === "javascript:"; 502 | try{ 503 | win.openTrustedLinkIn( 504 | desc.url, 505 | desc.where, 506 | { "allowPopups":isJsURI, 507 | "inBackground":desc.where==="tabshifted", // This doesn't work for some reason 508 | "allowInheritPrincipal":false, 509 | "private":!!desc.private, 510 | "userContextId":desc.url.startsWith("http")?desc.userContextId:null}); 511 | }catch(e){ 512 | console.error(e); 513 | return false 514 | } 515 | return true 516 | }, 517 | get prefs(){ return yPref }, 518 | 519 | restart: function (clearCache){ 520 | clearCache && Services.appinfo.invalidateCachesOnRestart(); 521 | let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool); 522 | Services.obs.notifyObservers( 523 | cancelQuit, 524 | "quit-application-requested", 525 | "restart" 526 | ); 527 | Services.startup.quit( Services.startup.eAttemptQuit | Services.startup.eRestart ) 528 | } 529 | } 530 | }; 531 | 532 | Object.freeze(_uc.utils); 533 | _uc.utils.startupFinished() 534 | .then(()=>{_uc.SESSION_RESTORED = true}); 535 | 536 | if (yPref.get(_uc.PREF_ENABLED) === undefined) { 537 | yPref.set(_uc.PREF_ENABLED, true); 538 | } 539 | 540 | if (yPref.get(_uc.PREF_SCRIPTSDISABLED) === undefined) { 541 | yPref.set(_uc.PREF_SCRIPTSDISABLED, ''); 542 | } 543 | 544 | function UserChrome_js() { 545 | _uc.getScripts(); 546 | Services.obs.addObserver(this, 'domwindowopened', false); 547 | } 548 | 549 | UserChrome_js.prototype = { 550 | observe: function (aSubject, aTopic, aData) { 551 | aSubject.addEventListener('DOMContentLoaded', this, true); 552 | }, 553 | 554 | handleEvent: function (aEvent) { 555 | let document = aEvent.originalTarget; 556 | let window = document.defaultView; 557 | let regex = /^chrome:(?!\/\/global\/content\/(commonDialog|alerts\/alert)\.xhtml)|about:(?!blank)/i; 558 | // Don't inject scripts to modal prompt windows or notifications 559 | if(regex.test(window.location.href)) { 560 | window._ucUtils = _uc.utils; 561 | document.allowUnsafeHTML = false; // https://bugzilla.mozilla.org/show_bug.cgi?id=1432966 562 | if(window._gBrowser){ // bug 1443849 563 | window.gBrowser = window._gBrowser; 564 | } 565 | let isWindow = window.isChromeWindow; 566 | 567 | /* Add a way to toggle scripts in tools menu */ 568 | let menu, popup, item; 569 | let ce = _uc.utils.createElement; 570 | if(isWindow){ 571 | menu = document.querySelector("#menu_openDownloads"); 572 | if(menu){ 573 | try{ 574 | popup = ce(document,"menupopup",{id:"menuUserScriptsPopup",onpopupshown:`_ucUtils.updateMenuStatus(this)`}); 575 | item = ce(document,"menu",{id:"userScriptsMenu",label:"userScripts"}); 576 | }catch(e){ 577 | isWindow = false; 578 | } 579 | }else{ 580 | isWindow = false; 581 | } 582 | } 583 | if(yPref.get(_uc.PREF_ENABLED)){ 584 | Object.values(_uc.scripts).forEach(script => { 585 | _uc.loadScript(script, window); 586 | if(isWindow){ 587 | popup.appendChild(ce(document,"menuitem",{type:"checkbox",label:script.name||script.filename,filename:script.filename,checked:"true",oncommand:`_ucUtils.toggleScript(this)`})) 588 | } 589 | }); 590 | } 591 | if(isWindow){ 592 | popup.appendChild(ce(document,"menuseparator",{})); 593 | popup.appendChild(ce(document,"menuitem",{label:"Restart now!",oncommand:"_ucUtils.restart(true)",tooltiptext:"Toggling scripts requires a restart"})); 594 | item.appendChild(popup); 595 | menu.parentNode.insertBefore(item,menu); 596 | } 597 | } 598 | } 599 | }; 600 | 601 | !Services.appinfo.inSafeMode && new UserChrome_js(); --------------------------------------------------------------------------------