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

Greasy Fork update/download URL changes #1904

Closed
JasonBarnabe opened this issue Nov 20, 2023 · 4 comments
Closed

Greasy Fork update/download URL changes #1904

JasonBarnabe opened this issue Nov 20, 2023 · 4 comments

Comments

@JasonBarnabe
Copy link

Greasy Fork is changing the URLs where user.js and meta.js code is hosted. This change is being done to help handle the load on the server coming from update checks.

New URLs are in the format:

https://update.greasyfork.org/scripts/1/GreasemonkeyTampermonkeyViolentmonkey%20test%20style.user.js
https://update.greasyfork.org/scripts/1/GreasemonkeyTampermonkeyViolentmonkey%20test%20style.meta.js

The Accept header is not read - what you get is solely based on the extension.

The old URLs in the form

https://greasyfork.org/scripts/1-greasemonkey-tampermonkey-violentmonkey-test-style/code/GreasemonkeyTampermonkeyViolentmonkey%20test%20style.user.js
https://greasyfork.org/scripts/1-greasemonkey-tampermonkey-violentmonkey-test-style/code/GreasemonkeyTampermonkeyViolentmonkey%20test%20style.meta.js

will continue to work indefinitely, but may be updated to just redirect to the new URLs.

If a user has already installed from https://greasyfork.org/scripts/1-greasemonkey-tampermonkey-violentmonkey-test-style/code/GreasemonkeyTampermonkeyViolentmonkey%20test%20style.user.js, and I add the following to the script:

@downloadURL https://update.greasyfork.org/scripts/1/GreasemonkeyTampermonkeyViolentmonkey%20test%20style.user.js
@updateURL https://update.greasyfork.org/scripts/1/GreasemonkeyTampermonkeyViolentmonkey%20test%20style.meta.js

Will that properly start getting updates from the new URLs? Or is there a better way to accomplish this?

@derjanb
Copy link
Member

derjanb commented Nov 23, 2023

That will work (but only for newly installed and updated scripts). 👍

@JasonBarnabe
Copy link
Author

Sorry, not sure what exactly you mean by "updated scripts".

If a user installed from URL1, then I change URL1 to start serving out scripts with @downloadURL URL2 and @updateURL URL2, then:

  1. The next time they check for an update, it will be to URL1, and then all subsequent update checks will be to URL2, or
  2. They will continue checking URL1 for updates until the next time the @version in the script is increased, and then all further checks will be to URL2, or
  3. Something else

@derjanb
Copy link
Member

derjanb commented Nov 24, 2023

  1. They will continue checking URL1 for updates until the next time the @version in the script is increased, and then all further checks will be to URL2

This is what I meant.

@JasonBarnabe
Copy link
Author

Great, thanks for clarifying.

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

2 participants