danyalaytekin / some-userscripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some UserScripts

This repo will assemble some simple UserScripts written for Safari, in particular Safari running the UserScripts extension by Justin Wasack.

Notes for myself

  • The UserScripts app:
    • checks for the same kind of front-matter at @updateURL as is present in a script, so this URL might as well be the same as @downloadURL, unless the script becomes very large
    • doesn't pick up JS scripts with front matter written as /* {front matter} */ instead of // front matter; I don't know whether this is a general rule affecting all clients
      • it's fine with CSS files doing this

How to... CSS → JS

some-userstyle.css

/* ==UserStyle==
@name           Some UserStyle
...
==/UserStyle== */

body {
    display: none;
}

some-userscript.js

// ==UserScript==
// @name           Some UserScript
// @grant          GM.addStyle
// ...
// ==/UserScript==

GM.addStyle(`
    body {
        display: none;
    }
`)

Related

  • GreasyFork, a library of UserScripts
  • Other people's scripts

About

License:Mozilla Public License 2.0


Languages

Language:JavaScript 58.2%Language:CSS 41.8%