1

Using Firefox 87, I would like have some kind of warning when I am on a specific website or domain. Like a parental control, except that instead of blocking the content, it just gives me a visual feedback that I am on a domain of my list.

For context, I am developing with Qt 6 and often end up on Qt 5 documentation when looking for help (https://doc.qt.io/qt-6/ vs https://doc.qt.io/qt-5/ ) which is sometimes (but not always) deprecated. So I would like to know easily that the page I'm looking for is not Qt6

2
  • How much effort are you wanting to put in? I posit Privoxy can be coerced into doing what you want, albeit with programming work required - privoxy.org. Another possibility might be to deliberately break https negotiation (eg using a transparent proxy and hosts file) and that breaking https could be a signal that you are on a site to be careful of.
    – davidgo
    Commented Apr 14, 2021 at 7:33
  • well that seems to be heavy artillery for a very small problem... Hoped for something simpler but that might do
    – sayanel
    Commented Apr 14, 2021 at 8:45

1 Answer 1

2

You could use this addon to add some custom CSS depending on the URL :

https://addons.mozilla.org/en-GB/firefox/addon/custom-style-script/

e.g. something like :

Addon option page with filled parameters

if (document.URL.includes("qt-5")) {
    var css = 'body { background: red; }',
    head = document.head || document.getElementsByTagName('head')[0],
    style = document.createElement('style');

    head.appendChild(style);

    style.type = 'text/css';
    style.appendChild(document.createTextNode(css));
}
2
  • 1
    Perfect, exactly what I wanted thank you. I had to also add doc-snapshots.qt.io because google often give result there
    – sayanel
    Commented Apr 16, 2021 at 15:24
  • 1
    Nice. Now my browser shows me a warning when I'm viewing our production servers rather than my own development server (so hopefully I'll never make THAT mistake again). :D
    – Pete
    Commented Nov 2, 2023 at 6:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .