مۇنازىرىلەر » Greasy Fork قا ئىنكاس

Improve match/include rules detection that uses regex

§
يوللانغان ۋاقتى: 2020-11-23

Isn't that hard to find that a lot of match and include rules are not correctly "displayed" by greasyfork. They are not translated into the websites, so the scripts are not easy to find.

woxxomMod
§
يوللانغان ۋاقتى: 2020-11-23

Might be possible by using a regexp parser to build an array of possibilities and analyze it. Probably not trivial though.

§
يوللانغان ۋاقتى: 2020-11-23

This shouldn't be something hard to implement, I also don't think it's trivial. If it was trivial greasyfork wouldn't already have this feature, and also wouldn't have a filter to filter/search for scripts by the site that are on the script match/include rules.

I mean why is this regex /^https:\/\/myanimelist\.net\/anime\/[\d]+(\/.*)?/ understood by greasyfork that the script works on myanimelist.net
while this regex /^https:\/\/myanimelist\.net\/anime\/[0-9]+\/* is not displayed as being a script made for myanimelist.net?
These 2 regexs aren't that much different anyways,this seems to be a greasyfork bug

§
يوللانغان ۋاقتى: 2020-11-23

Thanks. I don't have an account on github, for now I would like not to have one...
I will think if I will do this list or not on my spare time.

§
يوللانغان ۋاقتى: 2020-11-24

Thanks. This makes sense.
But I'm not sure if the other scripts I see also have this same problem, or if is something different

§
يوللانغان ۋاقتى: 2020-11-24

sure,I will think if I will do this list or not on my spare time.I want to help, and I will if I can

§
يوللانغان ۋاقتى: 2021-03-16

@JasonBarnabe
/(https?:\/\/)+(gumroad|laostelephone)(\.com)(\/.*)?/

The regex is perfect I guess, but greasyfork doesn't accept them as being different websites and just shows the whole regex. How can I make greasyfork recognize every url on that regex?

https://gumroad.com/adasdasdasd
https://laostelephone.com/wwww2

§
يوللانغان ۋاقتى: 2021-03-16

@hacker09

// @match           gumroad.com
// @match           laostelephone.com
// @include         /(https?:\/\/)+(gumroad|laostelephone)(\.com)(\/.*)?/
§
يوللانغان ۋاقتى: 2021-03-16
تەھرىرلەنگەن ۋاقتى: 2021-03-16

@Konf

The include regex already matches the matches... so there's no need to have them there...
That's why I want to use regex and include instead of a bunch of match rules...

§
يوللانغان ۋاقتى: 2021-03-16

a bunch of match rules

Is there a lot? It works though

§
يوللانغان ۋاقتى: 2021-03-16

@Konf

I've a script with more than +/- 52 match rules...

§
يوللانغان ۋاقتى: 2021-03-19

@JasonBarnabe

Thank you so much. I would also like to suggest that greasyfork should have a page explaining somewhere how the regexes matching works on greasyfork, so that devs can correctly do the regex in a way that greasyfork will understand.

Also please let me know when this new "or regex" implementation is done so I can add this to my scripts.

§
يوللانغان ۋاقتى: 2021-03-30
تەھرىرلەنگەن ۋاقتى: 2021-03-30

@JasonBarnabe
Nice, it's much better now!

Thanks for remembering to let me know when you finished doing that!

Btw
These doesn't work well
// @match /(https?:\/\/)(www\.)?+(thepiratefilmes?torrent)(\.tv)(\/.*)?/
// @match /(https?:\/\/)(www\.)?+(adrenalinagames.com|mastercuriosidadesbr.net)(\/.*)?/
// @match /(https://adrenalinagames.com|https://mastercuriosidadesbr.net)(\/.*)?/
// @match *://filmestvdublado.home.blog/*
// @match *://filmeshdcompletos1.podbean.com/*

§
يوللانغان ۋاقتى: 2021-03-31
تەھرىرلەنگەن ۋاقتى: 2021-03-31
Looks like it would match thepiratefilmetorrent.tv. Is that not what's happening?

No. It's supposed to match thepiratefilmetorrent.tv and thepiratefilmestorrent.tv

The lack of escaping for the .s makes these not work.

How could I make them work then?

Yes they aren't, but they should become
filmestvdublado.home.blog
filmeshdcompletos1.podbean.com

§
يوللانغان ۋاقتى: 2021-03-31
تەھرىرلەنگەن ۋاقتى: 2021-03-31

This
/(https?:\/\/)(www\.)?+(thepiratefilmes?torrent)(\.tv)(\/.*)?/
is a shortcurt for
/(https?:\/\/)(www\.)?+(thepiratefilmestorrent|thepiratefilmetorrent)(\.tv)(\/.*)?/

So I shared that shortcut that isn't recognized as 2 websites now by greasyfork just because I tried to use them but they weren't recognized, but if you don't want to add support for that, that's okay too...

https://i2.paste.pics/39d67786e967657c2abf9c7a92cbfcfa.png

No, they both become just home.blog and podbean.com

§
يوللانغان ۋاقتى: 2021-04-02

Wait.. Maybe it was not a bug. I just forgot to escape a dot character

§
يوللانغان ۋاقتى: 2021-04-02

Asterisk might be better

§
يوللانغان ۋاقتى: 2021-04-02

You just need to escape that period

Sure thing. But overall, asterisk it is like a standart

complaining about stuff it doesn't understand

What you mean?

جاۋاب قايتۇرۇش

جاۋاب قايتۇرۇش ئۈچۈن كىرىش.