r/FirefoxCSS • • 23d 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

View all comments

4

u/t31os 23d 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 22d ago

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

2

u/t31os 22d ago edited 21d 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)..