Greasy Fork is available in English.

Discussioni » Feedback di Greasy Fork

greasyfork site @match vs @include request

§
Pubblicato: 25/09/2021

Summary
I would like 'greasyfork.org/scripts/by-site.json' to count its sites by using both @includes and @matches, rather than just @matches.

Explanation
I recently came across a script named Userscript+ : Show Site All UserJS - it's a popular script that automatically shows users, on any website, if applicable greasyfork scripts exist, and lists them. I checked and saw that my script 9anime Bingewatcher+ did not appear in its listings.

To find the reason, I looked into Userscript+ : Show Site All UserJS's source code, and saw that its method for counting results used a public Greasyfork site stat resource link: greasyfork.org/scripts/by-site.json - this link indexes website names and the number of Greasyfork userscripts that exist for each of them. After comparing the code between successfully listed results, I saw what they had in common was that they all used @matches in their Metadata Blocks.

All of the 33 userscripts I've uploaded used @includes rather than @matches. To have them listed, at this moment, I would have to add or convert all of them to use @matches. And, this made me aware that this situation also applies to all the other authors who who aren't aware of this issue by using @includes instead of @matches.

What is the difference between @include and @match in userscripts? - I read this informative Stackoverflow article, and while differences exist, I don't think they should mean that Greasyfork author's userscripts that use @includes should lose exposure or potential users by their not being equally counted or listed. And so, I was hoping the issue could be looked into, that is if both @includes and @matches could be used when generating 'greasyfork.org/scripts/by-site.json'

cheers

§
Pubblicato: 27/09/2021

@includes and @matches are equivalent according to Greasy Fork's parsing.

What will affect the results at /scripts/by-site.json (and also the "Applies to" section of your script's page) is the use of wildcards. If it can't figure out the domain due to the use of wildcards, it won't be listed.

What specific domain are you expecting https://greasyfork.org/en/scripts/401339-9anime-bingewatcher to show up for?

Pubblica risposta

Accedi per pubblicare una risposta.