Skip to content

Instantly share code, notes, and snippets.

@greglockwood
Forked from jbryson3/example.user.js
Last active December 18, 2023 01:48
Show Gist options
  • Save greglockwood/c39c9225a4b67f144703196f1959108a to your computer and use it in GitHub Desktop.
Save greglockwood/c39c9225a4b67f144703196f1959108a to your computer and use it in GitHub Desktop.
This is an example showing Gist capability and how to auto update
// ==UserScript==
// @name EXAMPLE SCRIPT
// @version 0.9
// @description This is an example showing Gist capability and how to auto update
// @author jbryson3
// @match. https://www.google.com
// @grant none
// @updateURL https://gist.github.com/greglockwood/c39c9225a4b67f144703196f1959108a/raw/example.user.js
// @downloadURL https://gist.github.com/greglockwood/c39c9225a4b67f144703196f1959108a/raw/example.user.js
// ==/UserScript==
////////////////////////////////////
// TO MAKE THE SCRIPT AUTO-UPDATE //
////////////////////////////////////
// The format for the updateURL and download URL links above is as follows:
// https://gist.github.com/<USER_NAME>/<GIST_ID>/raw/<GIST_FILE_NAME>
// Get the GIST_ID from the URL of the main gist page for this gist (not the raw link page)
// This is just to show when the script has updated.
alert('you are running version ' + GM_info.script.version);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment