2

I need a Chrome extension that assigns any kind of attribute to the <html> tag. The only requirements are that it does so predictably, so I know I can always count on it setting that attribute, and also that the extension doesn't do anything obnoxious.

I don't care what the extension is for, I just want that attribute.

The reason I want this is because I want to construct a selector that selects the <html> tag just before the extensions load, and then deselects it as soon as they load, for this question.)

Is anyone familiar with such an extension?

Ram Rachum
  • 5,121
  • 14
  • 58
  • 80
  • If you still need it (after my answer to your other question), let me know. It would be trivial to construct this based on [Dark by Default](https://github.com/oliversalzburg/dbd). – Oliver Salzburg May 12 '13 at 16:29
  • @OliverSalzburg Yep, I want it, thanks! And you should post it here as an answer and get the bounty. – Ram Rachum May 13 '13 at 10:45

2 Answers2

1

I wrote the extension Dark by Default which applies a black background to the <html> element as soon as it becomes available for manipulation.

The extension is also available on GitHub.

As of version 0.3, the extension will leave a CSS class on the <html> element dark-by-default, you could use that CSS class for your selector.

I actually started using the extension myself. It goes very well with the Super User Dark Theme :D

Oliver Salzburg
  • 86,445
  • 63
  • 260
  • 306
0

Chrome natively supports user scripts, so Greasemonkey scripts also work in Google Chrome (and not only in Firefox).

For starters, see :

Beginner Guide for Greasemonkey Scripts in Google Chrome.
Greasemonkey Manual:Getting Help

You might also have a look at these depositories of Greasemonkey Scripts :

Userscript.org
Userstyles.org

harrymc
  • 455,459
  • 31
  • 526
  • 924