Συζητήσεις » Greasy Fork Ανατροφοδότηση

[RESOLVED] Incorrect @version in .user.js

§
Δημοσιεύτηκε: 03/03/2014
Επεξεργάστηκε: 08/03/2014

[RESOLVED] Incorrect @version in .user.js

#userscript #metadata

https://greasyfork.org/scripts/10/code -> version 7.5 (as I posted)
https://greasyfork.org/scripts/10/code.user.js? -> version 1.20140303163054

edit
Turned out, all my scripts' versions are changed!

§
Δημοσιεύτηκε: 03/03/2014
Επεξεργάστηκε: 03/03/2014
Idx
§
Δημοσιεύτηκε: 03/03/2014
Επεξεργάστηκε: 03/03/2014

*nimbrung yes,.
I think providing meta api and what realy happen here is something quite different.
This is just my opinion,.
I dont know why you have to rewrite the version meta in the script, which previously documented here http://wiki.greasespot.net/Metadata_Block.
Why dont just make another one? And suggest us not bother to use/modify it, coz somehow you'll validate when it goes wrong.
Some or maybe a lot of script out there have high dependence on this, let say when it has self check for an update, this behaviour then helped by ".meta.js" to not suck the whole script.
And in the other side version meta is more like label for author, coz it always appear in most extension/addons like Greasemonkey/Tampermonkey after the script name it self,. timestamp is kinda ugly and not human-friendly imo o_O"

That's all.
ouw and btw, i like the idea if it'll automate with timestamp meta anyway, cut my effort to (new Date).getTime() everytime i commit :)

§
Δημοσιεύτηκε: 03/03/2014
Επεξεργάστηκε: 03/03/2014

The metadata of a script should never be modified from what the author intends if at all possible, especially in the case of debugging (e.g. "What version are you using, user?"). I would rather throw up a warning that the version wasn't incremented, but still allow the user to upload the script. In the case of non-existent @version keys, that should be the only time you should add one on your end.

For the meta.js routine (serving just the script metadata), keep in mind that you can handle this by checking the `Accept` header that GM implemented recently: https://github.com/greasemonkey/greasemonkey/issues/1824

§
Δημοσιεύτηκε: 03/03/2014

Yes there is always a chance someone could use the same @name and @namespace, but it would only wipe out on new install. GM prevents updates installing over a current script (https://github.com/greasemonkey/greasemonkey/blob/838f5b7da8a9ce5444efbc13a3758adeb35dd3fc/modules/script.js#L537-554). I don't think this is a big concern.

If an author defines a @key, it should never be overwritten or modified. If it doesn't exist, then I think it would be OK to add it, but I would limit those you add to @namespace and @version. @name should always be there, but if not I wouldn't even allow it--error in that case.

The "Accept" header would eliminate the need for you to define the @*URL keys as you can check to see if GM is asking for meta or not. If it is, you could automatically serve just the meta. If not, serve the full script.

§
Δημοσιεύτηκε: 06/03/2014

Thanks.

Δημοσίευση απάντησης

Συνδεθείτε για να δημοσιεύσετε μια απάντηση.