2
I currently make and update a Stylish userstyle and it is updated frequently, is there any way that I can add to the userstyle to make it auto update for people who use it?
Or if I can't do the above, can I make a Greasemonkey script to do so?
2
I currently make and update a Stylish userstyle and it is updated frequently, is there any way that I can add to the userstyle to make it auto update for people who use it?
Or if I can't do the above, can I make a Greasemonkey script to do so?
2
Greasemonkey scripts can already auto update (since 2012)
There is an active discussion (last update 2014) regarding adding auto update to stylish scripts. The last applicable comment would seem to "No plans to have automatic updates" (2009).
In the 0.9.18 release, Greasemonkey is now checking for, and installing, updated versions of user scripts by default. This post is intended as a primer for how this new functionality works, both for users and for script authors.
The Greasemonkey Options dialog now includes these settings to control automatic update checking and installation. By default updates will be checked for every seven days, and automatically installed when found. The download location must be secure (https) by default. And it should just work!
If you know there's an update, you can open the Add-ons manager, right click on a User Script, and choose "Find Updates". This will check immediately, even if a scheduled check has happened more recently than seven days ago.*
*You may need to clear your browser cache, if an old version of the script was downloaded recently.
Script Authors
Greasemonkey supports a number of new metadata directives to support updates: @downloadURL, @updateURL and (more than before) @version.
The @updateURL will be accessed when checking for the update. This can be a ".meta.js" format like userscripts.org produces, with only the metadata. The @version defined here will be checked to the install version. It does not need to be hosted on https to be checked by default.
Sidebar: for userscripts.org, the updateURL is automatically set to the .meta.js corresponding to the script, and passed through the Coral Content Distribution Network (see why).
The @downloadURL is where the update will be downloaded from, when found. This is most useful to guarantee that updates come from a secure (https) location, so that they will be installed by default.
If @updateURL or @downloadURL are not provided, the URL that the script was downloaded from is used instead. If the @downloadURL is not provided and the install URL is not known, updates will never be applied.
Finally the @version directive controls what is considered an update. Read about the (Mozilla) toolkit version format to learn exactly what value is greater than what, and what formats are valid.
It's also worth pointing out that the recently added GM_info API can be used to check if Greasemonkey will ever try to apply updates (e.g. because the user has turned it off, or the URL is insecure).
Finally, if you want to make sure that Greasemonkey will never update your script, it can be accomplished by providing an invalid @updateURL (like "about:blank") which will never return a newer version.
Judging by your suggested edit it appears you have either lost your identifying cookie (needed for unregistered accounts) or you are using a different computer or browser. If you register an account from your original computer you'll then be able to edit, comment on and accept answers to this question. If you no longer have access to that machine/browser you can register a new account and then use the contact form to request your old and new accounts to be merged which will give you control of this question.
– Mokubai – 2015-10-03T09:40:35.890