amitbl / blocktube

YouTube™ content blocker
GNU General Public License v3.0
909 stars 65 forks source link

how strict is advanced search? e.g would keyword "ball" also filter football, volleyball, basketball etc. #342

Open bigfixenergy opened 11 months ago

bigfixenergy commented 11 months ago

For advanced filtering how strict is the filter at removing recommended videos? Does it only filter a title with the word "ball" separated by spaces and not touch sneakier words like "football", or does it aggressively target anything that matches these specific characters no matter spaces between or any other punctuation? Like if you were to filter "blue berry" would it only filter this case sensitively or would it also attack anything that matches this like "Blue Berry" or "Blue_Berry"?

ewonais commented 11 months ago

"ball" wuld match "football" but " ball" wold not advansed sertch ios case sensative. use this "[Bb]lue[_ ][Bb]erry" to match all combinations to filter for some special charackrers (ex. ^$|[]) tou nead to "dubbel escape them" ie "\[" to filter for "["

Vitamin-X commented 10 months ago

title = video.title.toLowerCase(); if(title.search("ball")return true;

or just make it lowercase? lol the filters are just javascript, but .search gives you a number where in the string that parts start, like "come play football".search("ball") returns 14

and you could also wipe all spaces "come play football".replaceAll(" ","") returns "comeplayfootball"