Skip to content

Instantly share code, notes, and snippets.

@mry
Last active February 9, 2016 19:45
Show Gist options
  • Save mry/94d0ab355b20a725a1f7 to your computer and use it in GitHub Desktop.
Save mry/94d0ab355b20a725a1f7 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.5
// @description This is an example showing Gist capability and how to auto update
// @author ballparts
// @include http://*.koalabeast.com*
// @include http://*.jukejuice.com*
// @include http://*.newcompte.fr*
// @grant none
// @updateURL https://gist.github.com/mry/94d0ab355b20a725a1f7/raw/example.meta.js
// @downloadURL https://gist.github.com/mry/94d0ab355b20a725a1f7/raw/example.user.js
// ==/UserScript==
// ==UserScript==
// @name EXAMPLE SCRIPT
// @version 0.5
// @description This is an example showing Gist capability and how to auto update
// @author ballparts
// @include http://*.koalabeast.com*
// @include http://*.jukejuice.com*
// @include http://*.newcompte.fr*
// @grant none
// @updateURL https://gist.github.com/mry/94d0ab355b20a725a1f7/raw/example.meta.js
// @downloadURL https://gist.github.com/mry/94d0ab355b20a725a1f7/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