Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta file timestamp #215

Closed
TimidScript opened this issue Jul 26, 2014 · 5 comments
Closed

Meta file timestamp #215

TimidScript opened this issue Jul 26, 2014 · 5 comments

Comments

@TimidScript
Copy link

Add a timestamp or an incremental version value in the userscript header part of the "meta.js" file. Useful for update scripts as the @Version does not always get updated.

An example of uso added:

// ==UserScript==
....
// @uso:script      179414
// @uso:version     648633
// @uso:timestamp   Mon, 07 Oct 2013 20:45:33 +0000
// @uso:installs    0
// @uso:reviews     0
// @uso:rating      0.00
// @uso:discussions 0
// @uso:fans        0
// @uso:hash        ee9569861f67f895db92d849f6ab4dd9c7bb7138
// ==/UserScript==

Very useful and informative.

Thanks

@cletusc
Copy link

cletusc commented Jul 26, 2014

If you update the script, you should always bump the version. I am -1 on this; userscript engines already handle updates via @version and there is no need for update scripts. Those update scripts that are still out there should use @version just like the userscript engines.

@derjanb
Copy link

derjanb commented Jul 26, 2014

I'm not arguing for or against this, but for the record:

userscripts.org did not require a @version tag at all. That's why at least Tampermonkey will also update scripts if the @uso:hash property has changed.

@Martii
Copy link

Martii commented Jul 26, 2014

That's why at least Tampermonkey will also update scripts if the @uso:hash property has changed.

That I did not know. Hashing may become a realization on OUJS at some point for integrity checks but greasemonkey/greasemonkey#1963 needs to be finalized with possible consideration of OpenUserJS/OpenUserJS.org#226 (comment) regarding the delimiter character I think.

Add a timestamp or an incremental version value in the userscript header part of the "meta.js" file. Useful for update scripts as the @Version does not always get updated.

@version is the current standard for triggering one though @TimidScript and it is unlikely that any other user.js engine will implement an additional update check on another key besides what is commented here.

@TimidScript
Copy link
Author

Until now, I did not know how FireFox extension addon checks for updates, but I know that some USO update scripts (including mine) used the extra information provided by USO for checking update.

The Tampermonkey way, @uso-hash, is also another way to differentiate between updates that does not rely on the user changing the version number. I do like the @hash property better than an auto-incremental version number.

The information such as number of installs, rating for specific version is also quite an interesting stats for authors (or at least this author).

@JasonBarnabe
Copy link
Collaborator

I don't see a reason for this - as mentioned, you should use @version and increment it if the script changes (the site will complain if you don't, but you can override). If you don't want to handle updating @version, leave it out, and the site will automatically generate it based on a timestamp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants