Created
February 22, 2018 16:47
-
-
Save arantius/eec890c9ce4ff2f7abee896c0bba664d to your computer and use it in GitHub Desktop.
GM_addStyle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function GM_addStyle(aCss) { | |
'use strict'; | |
let head = document.getElementsByTagName('head')[0]; | |
if (head) { | |
let style = document.createElement('style'); | |
style.setAttribute('type', 'text/css'); | |
style.textContent = aCss; | |
head.appendChild(style); | |
return style; | |
} | |
return null; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment