File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Userscript helpers
2
- Some helper functions for userscripts.
2
+ Some helper functions for userscripts, including:
3
+ * applyCss - A more robust alternative to [ GM_addStyle] ( https://wiki.greasespot.net/GM_addStyle )
4
+ * More to come...
3
5
4
6
### Usage examples
5
7
Add to your userscript's [ metadata block] ( https://wiki.greasespot.net/Metadata_Block ) :
6
- ` // @require https://cdn.rawgit.com/HatScripts/UserscriptHelpers/3c55360a/applyCss.min.js `
7
-
8
+ ``` javascript
9
+ // @require https://cdn.rawgit.com/HatScripts/UserscriptHelpers/3c55360a/applyCss.min.js
10
+ ```
11
+ And then call it like so:
12
+ ``` javascript
13
+ applyCss (' body { color: white; background-color: black; } img { border: 0; }' );
14
+ ```
15
+ or
8
16
``` javascript
9
17
applyCss (`
10
18
body {
You can’t perform that action at this time.
0 commit comments