Difference between revisions of "GM addStyle"

From GreaseSpot Wiki
Jump to navigationJump to search
m (title underscore template)
 
(36 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{underscore|title=GM_addStyle}}
As of Greasemonkey 4.0, this method has been removed.


= Syntax =
<!-- TODO: When it exists, link to the compatibility polyfill docs. -->
 
'''GM_addStyle(''' ''css'' ''')'''
 
= Description =
 
Adds a string of CSS to the document.
 
Creates a new <code><style></code> element, adds the given CSS to it, and inserts it into the <code><head></code>.
 
= Examples =
 
GM_addStyle("body { color:red; }");

Latest revision as of 11:00, 3 November 2017

As of Greasemonkey 4.0, this method has been removed.