12

At the top of my script I have the following:

// ==UserScript== // @name Test script // @description testing auto-update // @namespace http://tampermonkey.net/ // @author newbie // @version 1.0.0 // @updateURL https://github.com/mygithubaccount/test/raw/master/test.user.js // @downloadURL https://github.com/mygithubaccount/test/raw/master/test.user.js // @match http://awebsite.com/* // @run-at document-end // @grant GM_getResourceText // @grant GM_addStyle // @grant GM_xmlhttpRequest // @grant GM_getResourceURL // @grant GM_xmlhttpRequest // ==/UserScript== 

Please note that these values are just for example.

When I make changes on the script and increase the version number on github and then push the changes to master it updates the raw script link, however I don't get auto-updates from Tampermonkey as in popups saying the script has an update. It will only update if I manually go to the link and reinstall the script to update it.

How can I make this auto-update with popups?

1

1 Answer 1

12

I am not an expert at userscripts, can only tell from my experience making TamperMonkey work:

In order for TamperMonkey to update, I had to copy&paste the URL into Update URL: on the script's Settings tab: here is a screenshot

(Make sure ☒ Check for updates is turned on, obviously.)

Then if you manually Check for userscript updates on the TamperMonkey icon, you should see a proper popup.

Sign up to request clarification or add additional context in comments.

3 Comments

This hint is gold! I changed // @updateURL ... in my script after installing since there was a typo, but SettingsUpdatesUpdate URL: [...] wasn't changed accordingly.
Additional note to that: Once you do any change on the Editor tab and save it, the Checkbox Check for updates gets turned off.
When you install the script from a correct URL (on which the new versions will be released) and new versions update @version you do not need to specify @updateURL. It is even better to not specify it. See Why is usage of the downloadURL & updateURL keys called unusual and how do they work?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.