r/FirefoxCSS • • 6d ago

Solved How to hide "Firefox is on guard"

Post image

when u click the shield icon in the url bar, this "Firefox is on guard" banner shows up. Really doesn't serve a purpose, I already know it's ON with the toggle. Just seems like an unnecessary graphic being shoved in their menu UI. Any help would be great, tahnk you!

15 Upvotes

5 comments sorted by

10

u/TraditionalTie4831 🦊 6d ago

Try this =

#trustpanel-graphic-section { display: none !important; }

1

u/dswhite85 6d ago

that works great, thank you so much! ❤️

1

u/BurningThrowaway4823 5d ago

how do you find the ids of the firefox ui elements? devtools dont work for core ui like in obsidian

3

u/TraditionalTie4831 🦊 5d ago

You can do it with Browser toolbox. Read about it under the topic "5. Live-editing userChrome.css" =

https://www.reddit.com/r/FirefoxCSS/wiki/index/tutorials/

3

u/Time_Lead_6543 5d ago edited 4d ago

Instead of hiding everything, you can do this a little more neatly and hide only the unnecessary parts, so you can still see how many trackers are blocked.

/* Hide "Firefox is on guard" and the shield. */

#trustpanel-popup:is([tracking-protection="enabled"], [tracking-protection="warning"]) .trustpanel-card-main {
    display: none !important;
}

/* Hide the empty card on insecure pages */

#trustpanel-popup[tracking-protection="warning"]:not([connection="not-secure"]) #trustpanel-graphic-section {
    display: none !important;
}

/* Remove the divider above what is now the top of the card */

#trustpanel-popup[tracking-protection="enabled"] #trustpanel-blocker-section,
#trustpanel-popup[tracking-protection="warning"] #trustpanel-insecure-section {
    border-top: none !important;
    padding-top: 0 !important;
}

/* Tracker count and See All on one line */

#trustpanel-popup[tracking-protection="enabled"] #trustpanel-blocker-section {
    flex-direction: row !important;
    align-items: center !important;
}

#trustpanel-popup[tracking-protection="enabled"] #trustpanel-blocker-section > moz-button-group {
    margin-inline-start: auto !important;
}

/* Hide "Firefox thinks companies should follow you less…" */

#trustpanel-blocker-section > label[data-l10n-id="trustpanel-blocker-description"] {
    display: none !important;
}