Address bar style changing with verified domain and identity
I already know the elements I need to make this happen, but how can I make it so when the element is used, it also triggers something else?
Here's what I am trying to do:
If #identity-box.verifiedIdentity, change #urlbar to this
if #identity-box.verifiedDomain, change #urlbar to this
#urlbar[level] .autocomplete-textbox-container > * isn't cutting it for me for what I want to do. I want the ENTIRE address bar to change based upon whether a website has a verified domain or verified identity.
Dropmarker not needed, but for anyone else reading who wants their whole address bar to changed based upon the above, that may be included as well for them.
Here's what I am trying to do:
If #identity-box.verifiedIdentity, change #urlbar to this
if #identity-box.verifiedDomain, change #urlbar to this
#urlbar[level] .autocomplete-textbox-container > * isn't cutting it for me for what I want to do. I want the ENTIRE address bar to change based upon whether a website has a verified domain or verified identity.
Dropmarker not needed, but for anyone else reading who wants their whole address bar to changed based upon the above, that may be included as well for them.
Comments
Like, go to G-Mail, the address bar is blue.
Go to addons.mozilla.org, and the address bar is green.
And having the URL bar red when on a broken/attack site would also be awesome, probably possible with level="low"/"broken". Is there a way to tell #urlbar to do something when verifiedIdentity or verifiedDomain takes effect?
switch(document.getElementById("identity-box").class) {
case "verifiedDomain": document.getElementById("urlbar").setAttribute("style", "background: red !important; border: none !important"); break;
case "verifiedIdentity": document.getElementById("urlbar").setAttribute("style", "background: green !important; border: 1px solid yellow !important"); break;
}
What ever your desired effect for the #urlbar.
No seriously, installed Greasemonkey, told the script to work with chrome://browser/content/browser.xul and it failed hard. I'll give up on it. It was just a neat effect I wanted to add to my "Guest" profile anyway.