Paste P6461

Random bit of code to replace GM_addStyle
ActivePublic

Authored by Anomie on Dec 13 2017, 6:40 PM.
1var head = document.getElementsByTagName('head')[0];
2var style = document.createElement('style');
3style.setAttribute('type', 'text/css');
4head.appendChild(style);
5
6function addStyle( css ) {
7style.sheet.insertRule( css, style.sheet.cssRules.length );
8}
Anomie created this paste.Dec 13 2017, 6:40 PM