① Feed the detector
② Pattern library (what the regex engine checks)
- Agreement fishing — “do you agree?”, “agree?”, “thoughts?”, “am I wrong?” → +35. Ends the tweet with a demand for replies; replies are weighted heavily by ranking algorithms.
- Tribal call-outs — “who's with me?”, “RT if…”, “like if…” → +30. Direct action solicitation, explicitly named in platform bait policies.
- Rage bait framing — “unpopular opinion:”, “hot take:”, “everyone is lying” → +20. Manufactured controversy farms quote-tweets.
- Curiosity gap — “they don't want you to know”, “this one secret”, threads promising 🧵 secrets → +15.
- Follow-bait — “follow for more”, “I'll DM you the…” → +25.
Scores stack and cap at 100. In the 3D pipeline, a tweet scoring ≥ 50 gets routed to the red BLOCK gate; 25–49 gets flagged; below 25 sails through. This mirrors how a real content script would decide before calling a block action.
④ Chrome extension anatomy — the real build
Why MutationObserver is non-negotiable
X/Twitter is a single-page app: tweets stream into the DOM as you scroll, long after your content script first runs. A one-time querySelectorAll sees only the first screenful. MutationObserver is the browser API that fires a callback whenever nodes are added — so every freshly rendered tweet passes through your detector the instant it appears.
Honest limitations
- There is no public "block user" browser API — extensions either simulate UI clicks (fragile, selector churn) or call the platform API with the user's own session, which can violate ToS and rate limits. Most shipped "blockers" just hide matching tweets client-side, which is fully within your rights on your own screen.
- Regexes have false positives: “do you agree with the proposed spec change?” in a genuine question is not bait. Real filters add context rules (question mid-thread vs. terminal hook) — exactly why the score here weights trailing hooks higher.
- Manifest V3 killed persistent background pages; long-lived logic belongs in the content script or an event-driven service worker.