Discussions » Greasy Fork Feedback
Meta block moved to start on upload. Breaks script.
Here is the script I am talking about: https://greasyfork.org/scripts/1700
Even more confusingly/worse, the untouched code is saved and displayed on the Update page, but the messed up code is delivered and shown on the Code page.
This is part of the rewriting the script by GreaseFork: https://greasyfork.org/help/rewriting
Maybe moving the metadata block to another place is arguable not the correct way.
As Jerone mentions, Greasy Fork is rewriting the meta block so that updates will be handled from Greasy Fork. I don't think I purposefully made it so the meta is always on the top, but it was more a case of "why would it ever not be", so I just went with the easier solution.
I can fix this, but can you not use GM_info to read your meta?
Hi Jason, thanks for the GM_info link, I was not aware of that function. The script is mostly used as a non-Greasemonkey script, I just made it compatible with Greasemonkey. I need a solution that works universally in all environments without needing different versions. This might actually be possible with GM_info.
The major concern is that Greasy Fork changes the code in a nontransparent way and thereby creates a fork of the script under the same version id. I need the script to be identical independent of the used repository.
I've filed https://github.com/JasonBarnabe/greasyfork/issues/163
Greasy Fork may still rewrite according to the link jerone posted, but I guess this will be one less potential change.
Thanks!
Hey thanks **Cacycle**, I’ve always looked for a way to get those metadata but i didn’t think of your great yet simple hack ! :)
I do not use any GM_* stuff either (neither want nor able).
OK, should be fixed now if you post a new version.
Meta block moved to start on upload. Breaks script.
When I upload scripts to Greasy Fork, the meta block gets moved to the start without any notice. This is unexpected, unnecessary, and, most importantly, it breaks my script. Code should ***never ever*** be changed automatically! Is there a way to fix this?
If we want people to see the block, we could extract it and display it separately.
(I need to have the block a few lines into the code so that I can extract version information for internal script use. Putting the block into a function is the only clean way to do this. I do not want to maintain duplicate version info in the code.)