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.


  • edited August 2010
    I believe, because the #identity-box element is contained within the #urlbar and css works going from right to left (i.e. "#urlbar > #identity-box" the #identity-box element will receive the instructions), you will need a javascript to accomplish your desired effect.
  • edited August 2010
    I suppose you've seen my style? I use #urlbar[level] .autocomplete-textbox-container and it colors the whole thing (for red, i wanted only the textbox, intentionally so). Isn't it what you're talking about?
  • No, I really mean #urlbar changing with #identity-box.

    Like, go to G-Mail, the address bar is blue.
    Go to, 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?
  • edited August 2010
    Yes, with a script and not css.

    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.
  • Posted By: having the URL bar red when on a broken/attack site would also be awesome...
    I've never seen Larry any colors but grey, green, and blue (which is, of course, probably a good thing).
  • *Becomes confused and faints!*

    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.
Sign In or Register to comment.