GM addStyle: Difference between revisions

From GreaseSpot Wiki
Jump to navigationJump to search
(Starting from: http://greasemonkey.mozdev.org/authoring.html)
 
No edit summary
(37 intermediate revisions by 9 users not shown)
Line 1: Line 1:
= Syntax =
As of Greasemonkey 4.0, this method has been removed.


'''GM_addStyle(''' ''css'' ''')'''
<!-- TODO: When it exists, link to the compatibility polyfill docs. -->
 
= 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; }");

Revision as of 15:00, 3 November 2017

As of Greasemonkey 4.0, this method has been removed.