Last active
February 12, 2025 16:14
-
-
Save Madis0/e62acaa14b18913467182f435e094d95 to your computer and use it in GitHub Desktop.
Hide https from URL in Firefox. Read more and use at own risk: https://reddit.com/r/FirefoxCSS/comments/857k5e/hiding_https_from_urlbar/ https://www.reddit.com/r/FirefoxCSS/comments/7mwfoi/my_notquite_singlebar_setup_finally_happy_with/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE bindings> | |
<bindings xmlns="http://www.mozilla.org/xbl"> | |
<binding id="urlbar" extends="chrome://browser/content/urlbarBindings.xml#urlbar"> | |
<implementation> | |
<method name="formatValue"> | |
<body><![CDATA[ | |
const textNode = this.editor.rootElement.firstChild; | |
if (this.focused) return; | |
try { | |
let url = this._value | |
if (url.startsWith("https")) { | |
url = url.slice(8); | |
if (url.startsWith("www")) { | |
url = url.slice(4); | |
} | |
} | |
textNode.textContent = url; | |
} catch (err) {} | |
]]></body> | |
</method> | |
</implementation> | |
</binding> | |
</bindings> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment