CB Quick Silence + Image Hash Guard

Original Quick Silence + image dHash matching (upload refs) and optional audio queue on detection

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Author
imarawn
Daily installs
0
Total installs
10
Ratings
0 0 0
Version
3.1.5
Created
2025-08-24
Updated
2025-10-30
Size
44 KB
License
CC-BY-NC-SA-4.0
Applies to

CB Quick Silence + Image Hash Guard (Supabase Sync)

A Tampermonkey userscript that adds a red Silence button (if you’re mod/broadcaster), auto-silences by username/trigger word, and now also detects repeat image spam using a fast dHash (64-bit) matcher. Optional soft audio cue on detection. Polled data comes from Supabase (shared by default, or use your own).


📌 What this script does

  • Silence button next to each username (mods/broadcasters only).
  • Auto-silences messages from usernames on a Supabase list.
  • Auto-highlights suspicious messages (when you’re not privileged).
  • Trigger-word scanning (from Supabase).
  • Image Hash Guard: computes a 64-bit dHash on images/GIFs/video posters in chat messages, compares to your uploaded reference hashes, and:
    • beeps softly on match (optional),
    • auto-silences (if privileged & enabled),
    • or highlights (if not privileged).
  • Floating settings panel (“QS ⚙️” bottom-left) for toggles, thresholds, audio tune, and reference management.
  • Periodic Supabase sync (configurable). Uses GM_xmlhttpRequestCSP-safe.
  • DB overlay to view active auto_silence_users with notes/reasons.

⚙️ How it works

  • On room enter, script checks if you’re mod/broadcaster.
  • Pulls usernames and trigger words from Supabase; re-syncs on a timer.
  • Scans each chat message:
    • If privileged and matches → POST to /roomsilence/{user}/{room}/
      (never includes /b/; CSRF handled).
    • If not privileged and matches → highlight only.
  • Image Hash Guard:
    • Extracts all image/video URLs in the message.
    • Computes dHash (8×8, 64-bit) and compares with your stored references.
    • If Hamming distance ≤ threshold → match → optional beep, auto-silence/highlight.

✨ Features

  • Text/User rules: usernames + trigger words from Supabase.
  • Image rules: local reference hash list (dHash), threshold-based matching.
  • Soft audio cue: subtle sine beep with low-pass filter; tunable volume/duration/frequency; once-per-message option.
  • Cooldown per image URL to avoid re-spamming detections.
  • No note prompt on manual silence (fast action).
  • SPA-safe: watches DOM changes, handles room navigation.
  • CSP-safe: uses GM_xmlhttpRequest with @connect to Supabase.

🖥️ Requirements

  • A userscript manager:
    • Tampermonkey (recommended)
    • Violentmonkey (ensure @connect permissions are allowed)
  • Runs on https://*.chaturbate.com/* (and optional testbed as configured).

🔧 Installation

  1. Install Tampermonkey.
  2. Install the script from SleazyFork (or paste the code into a new userscript).
  3. Open any Chaturbate room.
  4. Look for the “QS ⚙️” button (bottom-left) and the Silence buttons in chat.

🧩 The Settings Panel (QS ⚙️)

Click QS ⚙️ to open the floating panel.

Core

  • Auto Silence: on/off
  • Highlight Matches: on/off
  • Show Silence Buttons: on/off (mods only)
  • Poll interval (sec): set Supabase sync period
  • Sync now: force refresh from Supabase
  • Show DB list: open the overlay that lists active auto_silence_users

Image Hash Guard

  • Enable image-hash detection: master toggle
  • Threshold (0..64): Hamming distance; lower = stricter
  • Detect in mod/broadcaster messages: include/exclude staff posts
  • Add reference images…: upload one or more images to build your reference hash set
  • Clear references / Delete single entries

References are local to your browser (stored with Tampermonkey’s storage). Nothing is uploaded anywhere.

Audio (soft)

  • Beep on match: toggle
  • Volume: 0.0–1.0 (gentle default)
  • Tone (Hz): pitch of the sine wave
  • Duration (s): how long the beep lasts
  • Lowpass (Hz): smooth the sound
  • Once per message: avoid multiple beeps for many images
  • Test: play a sample beep

🌍 Supabase (Global Defaults)

By default, the script points to a shared Supabase project that provides:

  • auto_silence_users — who to silence
  • trigger_words — what to flag

You benefit from live updates without touching the code.


🛠️ Use Your Own Supabase (Optional)

Prefer full control? Set your own:

  • SUPABASE_URL
  • SUPABASE_ANON_KEY (or service key if you keep the script private)

Tables expected:

  • auto_silence_users with (at least)
    username (text), is_active (bool), and timestamps.
  • trigger_words with (at least)
    word (text), is_active (bool), and timestamps.

The script queries with select=* and filters is_active=true. Adjust your schema accordingly.


🔒 Privacy

  • The script does not exfiltrate your data anywhere.
  • All reference image hashes are stored locally in Tampermonkey storage.
  • Network requests go only to:
    • Chaturbate endpoints for moderation actions
    • Supabase for list sync

🧯 Troubleshooting

  • No Silence buttons? You’re likely not recognized as mod/broadcaster. The script auto-detects privileges via the room API.
  • 403 on silence? CSRF cookie missing or you’re not a mod. Reload the page or switch to a room where you have privileges.
  • No image matches? Ensure Image Hash Guard is enabled, references exist, and threshold isn’t too strict. Try 8–12 as a starting range.
  • Too many beeps? Enable Once per message and/or reduce volume.
  • High CPU? Keep your reference set reasonable. The dHash compare is fast, but thousands of refs are pointless.

🔐 Permissions used (Tampermonkey)

  • @grant GM_xmlhttpRequest — CSP-safe network to Supabase & media
  • @grant GM_getValue / GM_setValue — store settings & image hash refs
  • @grant GM_registerMenuCommand — open settings from TM menu
  • @connect *.supabase.co / supabase.co — Supabase REST
  • @match https://*.chaturbate.com/* — page scope
  • @noframes — don’t run in iframes

🪪 License

CC-BY-NC-SA 4.0

  • Free to use and share with attribution.
  • Non-commercial only.
  • Derivatives must keep the same license and give credit.