Change from <body> to <body id="stackoverflow-family-website">.

This way we can restyle the website simply modifying our user stylesheets without the need for greasemonkey scripts or similar.

For example:

#stackoverflow-family-website .reputation-score
   font-color: red; // Reputation is now shown in red

Idea taken from this answer

  • 1
    ... or write a greasemoney script to add the ID to the body tag and bobs you're uncle! – Mark Henderson Mar 2 '10 at 2:22
  • 4
    Write a greasemonkey script to get around writing a greasemonkey script? – D_N Mar 2 '10 at 2:47
  • Pretty much, yeah – Mark Henderson Mar 2 '10 at 2:54
  • +1 except I think it should be a CSS class name, not an ID. – The Unhandled Exception Jan 12 '12 at 20:04

Using a Gecko based browser? Use this instead:

@-moz-document domain(stackoverflow.com) {
 .reputation_score { font-color: red; }

Every system that exists, be it built into the browser or a plugin, that allows you to change the style of visited pages already has a way to discriminate websites.

Why would you want to add an id to the body?

Even if you were using a bookmarklet (the lowest tech I can think right that would allow you to change a website's layout) can check the current address (javascript:alert(location.host);return false;).

You must log in to answer this question.

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