Skip to content

HatScripts/userscript-helpers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Userscript helpers

Some helper functions for userscripts, including:

  • applyCss - A more robust alternative to GM_addStyle
  • More to come...

Usage examples

Add to your userscript's metadata block:

// @require https://cdn.rawgit.com/HatScripts/UserscriptHelpers/3c55360a/applyCss.min.js

And then call it like so:

applyCss('body { color: white; background-color: black; } img { border: 0; }');

or

applyCss(`
body {
  color: white;
  background-color: black;
}
img {
  border: 0;
}
`);

Releases

No releases published

Packages

No packages published