mgziminsky / FacebookTrackingRemoval

Browser extension that removes ads and the user interaction tracking from content on Facebook
GNU General Public License v3.0
121 stars 19 forks source link

Option to hide posts based on hashtag #87

Closed Lazza closed 3 months ago

Lazza commented 4 months ago

Is your feature request related to a problem? Please describe.

In Italy "content creators" must disclose when they are doing product placement or other advertisement in organic posts. They would usually include a hashtag like #adv or #sponsorizzato. It may be nice to let the user choose to hide posts based on (customizable) hashtags.

Describe the solution you'd like

A toggle for enabling the feature and a textbox for typing a list of hashtags.

Describe alternatives you've considered

I tried to use custom CSS selectors, but they don't seem to work.

mgziminsky commented 4 months ago

Adding user customizable lists has been on the TODO list for a long time, I just haven't bothered to do it since it hasn't seemed all that necessary. Adding another option for checking hashtags for the keywords would probably be pretty simple though and I may add at least that.

In the mean time, and to test it works as intended, you could try adding the following to the custom rules under the advanced options. Additional hashtags can be added separated by ||:

[role=link]||#adv||#sponsorizzato

That rule assumes the hashtags are linkified like in this screenshot. If they aren't, you could try using a regex rule like span||/.*#(adv|sponsorizzato)\b.*/, but that could be slow and high risk of false positive.

image

Lazza commented 3 months ago

Thank you for providing the suggestion. It took me a while to understand how to do it, but it worked with the first snippet!

Thanks again.