For a long (long) time, I have used something like the following userchrome to colour the location bar according to the level of security provided by a site:
The "high" and "low" levels thing actually hasn't worked in a long long time now. Also quite a long time ago, Mozilla introduced a new system that is only applied to the #identity-box element, but covers a wider selection of states. This is from the default theme, but I've added the ID to make it clearer:
patrickjdempsey wrote:The "high" and "low" levels thing actually hasn't worked in a long long time now.
Well, I know is was still working around the end of August (2015) but I don't know exactly when it stopped working (I may do some sleuthing on the weekend).
Thanks for the pointers -- at least I can now colour the icon container which provides (for me) a better visual clue than the default settings. Not quite as attention-grabbing as colouring the entire location bar but not bad.
Not likely to be "fixed". Firefox dropped coloring the urlbar way back in Firefox 3.0 and the legacy stuff is still there mostly because nobody had gotten around to removing it. It's possible one of the urlbar-modding or appearance-modding extensions will bring it back.
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
try{
document.getElementById("urlbar").setAttribute("connectionlevel", document.getElementById("identity-box").getAttribute("class"));
} catch(e) {}
});
});
observer.observe(document.querySelector('#identity-box'), { attributes: true, attributeFilter: ['class'] });
var ss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService);
var uri = Services.io.newURI("data:text/css;charset=utf-8," + encodeURIComponent('\
\
#urlbar[connectionlevel^="verifiedIdentity"] .autocomplete-textbox-container,\
#urlbar[connectionlevel^="verifiedDomain"] .autocomplete-textbox-container {\
background-color: #FFFFB7 !important;\
}\
\
'), null, null);
this.ss.loadAndRegisterSheet(uri, this.ss.AGENT_SHEET);
You can now even add more colors for all the available states:
.weakCipher
.mixedDisplayContent
.mixedDisplayContentLoadedActiveBlocked
.insecureLoginForms
.mixedActiveContent
.verifiedDomain
.verifiedIdentity
mozillaZine is an independent Mozilla community and advocacy site. We're not affiliated or endorsed by the Mozilla Corporation but we love them just the same.