Greasy Fork is available in English.

GreasyFork Bullshit Filter

Hides scripts for popular browser games and social networks as well as scripts that use "foreign" characters in descriptions. Applies to posts in Forum too.

< Отзив за GreasyFork Bullshit Filter

Въпрос/коментар

§
Публикуван на: 28.09.2019
Редактиран на: 28.09.2019

Clutter filter suggestion

Hi darkred!

First of all, I really like this script. I've been using it for a very long time. Today however I noticed that it excluded the following scripts that I made: https://greasyfork.org/en/scripts/19123-kissanime-remove-dubbed

I'm not sure if it is intentional that the clutter regex filters out scripts with the word "latest" in it. The cause is probably the following part .{0,4}test in your regex.

Thanks for taking a look at it.

Cptmathix

darkredАвтор
§
Публикуван на: 11.10.2019

The script tests the script title and description combined, against the regex. For your script, that's:

KissAnime - Remove Dubbed Remove all dubbed anime from the latest updates on the kissanime homepage and also from the Anime list

So, if you enter the 'Clutter' regex in https://regex101.com (which btw it's slightly modified/improved from the initial by kuehlschrank ) you'll notice that what is matched is the part a, i.e. atest from the word 'latest' from the 6th matching group, i.e. the second parenthesis in (just)?(\s*a)?\s*test.

This part (together with the following one) is meant to catch all possible "just a test" variations, ignoring all whitespace between.

Adding \b (word boundary) before test in the above part, i.e. (just)?(\s*a)?\s*\btest seems to fix your issue, but I'm not sure about adding it in the script.

  If you have a better idea, please feel free to share (and you are always welcome to submit a PR).

§
Публикуван на: 15.11.2019
Редактиран на: 15.11.2019

This doesn't look like a good regex (not that I am an expert :-/ ). In general, you can remove every "zero or one" (?) at the start or end of a partially matching regex. Only makes sense in between.

This boils it down to /\s*test/ which is clearly too broad. I suggest something like /(\ban?|\b)test(ing|s|\d+|\b)/i. The more examples I have or the more false positives / negatives you can give, the better the regex will be.

See https://regex101.com/r/yKkiQi/1

darkredАвтор
§
Публикуван на: 15.11.2019

Thanks for the suggestion. I'll see what I can do.

darkredАвтор
§
Публикуван на: 05.12.2019

I've just added your suggestion (slightly modified). Thank you.

Публикувайте отговор

Влезте, за да публикувате отговор.