Greasy Fork is available in English.

Discussions » Greasy Fork Feedback

greasyfork site @match vs @include request

§
Posted: 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

Post reply

Sign in to post a reply.