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
  • 4,450

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
  • 89,072
  • 65
  • 269
  • 311
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
  • 498,455