This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend
What I Built
Comment Shield is a small website for YouTube creators. You paste a video link, and it sorts the comments into Positive, Negative and Neutral.
I built it for my friend Manasa, a YouTuber. Scrolling through hundreds of comments looking for feedback means constantly running into the mean ones, and that wears her down. Creators need the feedback, but they shouldn't have to take a hit every time they check.
Who It's For and Why
Manasa my friend makes videos on Black Pink Edits. She told me whenever she sees a few comments on a single category(negative/positive) she just assumes that this is the overall review of that video. But when we differentiate the comments into different categories like positive or negative or neutral, it lets her know the actual truth of the opinion on the video. So I didn't just want a sentiment counter. I wanted something that changes how she reads comments.
Features
- Positive first: the app opens on the kind comments.
- Gentle mode (on by default): negative comments are blurred, and she taps one only when she's ready to read it.
- đźš© Harsh flag: strongly abusive comments are marked so she can skip them completely.
- Summary bar: shows the positive / neutral / negative split, so she can see that most viewers are on her side.
- Private by design: no backend and no accounts. The API key and comments stay in the browser.
Demo
Code
🛡️ Comment Shield
Comment Shield is a privacy-first web application designed for YouTube content creators. It automatically analyzes and categorizes comments on your videos into Positive, Neutral, and Negative sentiments—allowing you to read kind words first and engage with feedback on your own terms.
✨ Features
- Positive First: Loads encouraging and supportive comments first by default.
- Gentle Mode: Blurs negative comments automatically. Tap any blurred comment to reveal its text when you're ready to read it.
- đźš© Harsh Flagging: Highlights strongly abusive or harsh comments so you can easily identify or skip them.
- In-Browser Sentiment Analysis: Uses an open-source AI model running directly in your browser. Your comments never leave your device.
- Summary Breakdown: Visual sentiment distribution bar showing the percentage split of positive, neutral, and negative reactions.
- Fallback Support: Includes a lightweight local lexicon/word-list engine as a backup if the AI model fails to load.
🛠️ How
…(https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/zs541t1itcvrsegcxhwj.png)
How I Built It
- Stack: one HTML file, vanilla JavaScript, no framework and no build step.
-
Data: YouTube Data API v3 (
commentThreads), up to 500 top-level comments per video. -
Open-source AI: the open-weight model
twitter-roberta-base-sentiment-latest(RoBERTa trained on social media text), run locally in the browser with Transformers.js. - Fallback: a small word list is used if the model can't load, and it also helps flag very harsh comments.
- Hosting: GitHub Pages.
Limitations: it can misread sarcasm, it works best in English, and the first load downloads the model (cached afterwards).
What Manasa Said
"It helped me know how many of the audience are in favour of me and also the different categories of comments helped me a lot. Instead of manually checking all the comments this platform helped me to reduce time consumption and also great project."
Why Does Open Innovation Matter?
A closed sentiment API would need every creator's comments sent to a third party and billed per call. With an open-weight model running in the browser, the comments stay private, it's free to use, anyone can read the code to see how comments are judged, and anyone can fork it and swap in a model for their own language.
Top comments (0)