3 ms·
I just created a regex-based content blocker that literally blacks out text content on any webpage. Chrome extension. 2 modes - block only matches, or, block s
by purple-leafy 2y ago
I just created a regex-based content blocker that literally blacks out text content on any webpage. Chrome extension.
2 modes - block only matches, or, block surrounding text (too).
Create as many rules as you like, it will block anything.
I entered it into Google Built-in AI hackathon the other day.
Uses local LLM to scan blocked content to determine if regex was too trigger happy, then lets user unblock.
- ZYbCRq22HbJ2y7 2y agoWhat local LLM? What kind of prompt? That seems like a lot for what sounds like sentiment analysis?
- purple-leafy 2y agoGoogle Gemini Nano Not really sentiment analysis purely, though thats something I want to add. When I'm on hackernews, I'm tired of coming across comments about: - Donald Trump, Xi, Zelensky, Putin, Musk (Other people) - China / Russia / Ukraine / USA etc - Alcohol/drugs/gambling etc So I basically block all that content
- esperent 2y agoDid it block your own comment after you made it? More seriously, any plans to share it? I've been waiting for someone to build a tool like this, although I expected to use sentiment analysis directly rather than regex. Personally I'd love to block nitpicking comments here on HN, not sure if that could be done with regex though. Edit: just saw you shared it in another reply.
- purple-leafy 2y agoYep shared in other comment, keep an eye on repo - will have updates in new year post hackathon judging
- theaussiestew 2y agoCould you share? I'm looking to use something like this.
- purple-leafy 2y agoHere ya go, build from source :) [0] Needs some tidying up, and you need to figure out how to run the "AI" by following this article [1] [0] - https://github.com/con-dog/context-aware-pattern-blocker https://github.com/con-dog/context-aware-pattern-blocker [1] - https://developer.chrome.com/docs/extensions/ai/prompt-api https://developer.chrome.com/docs/extensions/ai/prompt-api