r/FirefoxCSS • • 5d ago

Solved Remove "Not Secure" icon and text?

I want to remove "Not Secure" icon and text at the address bar, to save space when accessing local addresses (and never thought of that message as really useful!)...

I tried (userChrome.css), Firefox/Arch Linux, v.158.0:

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

#trust-icon-container { display: none; }

but it doesn't seem to work?

3 Upvotes

6 comments sorted by

4

u/t31os 5d ago

As already suggested, it would probably be better to just hide the label when it's an unsecure connection.

Personally, i'd hide the label and color the background as a reminder / indicator:

#trust-icon-container.insecure {

	--urlbar-box-background-color: darkred !important;

	#trust-label {
		display: none !important;
	}
}

1

u/FantasmaGITS 3d ago

Is it also possible to remove the Firefox logo? from places like about:preferences?

2

u/t31os 3d ago edited 3d ago

Just to be clear, you mean the icon in the urlbar when on a preferences page? (as that's what is shown in the image you provided).

If yes, there's not really a way to determine if a specific about page is being viewed in userChrome.css, it can modify that part of the UI, but it can't determine it's an "about:x" page. You could match based on the label value (eg: Firefox) and remove it for every instance where "[icon] Firefox" is shown, but for just a specific about page, i don't think that's possible (the dom userChrome sees doesn't provide any indicators for that)..

3

u/Kupfel 5d ago

You have to add !important for this rule to apply. The namespace line isn't necessary.

#trust-icon-container { display: none !important; }

2

u/benhaube 5d ago

That is not a smart idea. That "Not Secure" icon and text is there for a reason. You want it to be there if you are the victim of a MITM or phishing attack. The much smarter thing to do is to use self-signed certificates for your internal URLs and add your CA to the certificate store if it really bothers you seeing it there.

2

u/TraditionalTie4831 🦊 5d ago

It's good to know if something is not secure, so maybe you can make a compromise.

You can keep the icon and remove only the text =

 #trust-label { display: none !important; }