Skip to content

ScrashOff/STFU-WhatsApp-Web-Extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STFU WhatsApp - Sound Muter Extension 🔇

A lightweight, secure, and premium browser extension designed to automatically mute WhatsApp Web sounds during user-configured time ranges (configured per weekday or for every day), or instantly via a manual override toggle.


Features

  • 🕒 Smart Scheduler: Configure time ranges to automatically silence incoming notification sounds.
  • 🌙 Midnight-Spanning Support: Robust calculations to handle mute schedules crossing over midnight (e.g., 22:00 to 08:00 next day).
  • 📅 Flexible Cycles: Switch between Every Day mode (one range for all days) or Custom Days mode (independent toggles and ranges for each day of the week).
  • Instant Mute: Force-mute all sounds immediately via a manual override switch in the popup.
  • 🎨 Premium Dark UI: A beautiful user interface aligned with WhatsApp Web's native dark mode, complete with:
    • Glassmorphic panels with subtle borders.
    • Sliding segmented controls (Every Day vs Custom Days).
    • Collapsible weekday grids with smooth animations.
    • Dynamic status badge with a live pulsing indicator (Green for active, Red for muted).
  • 🔊 Double Muting Engine:
    • Native Tab Muting: Silences standard browser tabs natively.
    • Page-Level Interceptor: Silences sound elements directly inside the webpage, fully supporting isolated panels like the Opera GX Sidebar Panel.
  • 🔒 Privacy First: Runs 100% locally. Zero telemetry, zero network tracking, and zero data collection.

Installation

For Google Chrome, Opera, Brave, and Edge

  1. Download or clone this repository to your computer.
  2. Open your browser and navigate to the extensions management page:
    • Chrome: chrome://extensions/
    • Opera / Opera GX: opera://extensions/
    • Edge: edge://extensions/
  3. Enable Developer mode (usually a toggle switch on the top-right of the page).
  4. Click the Load unpacked button (top-left).
  5. Select the src directory located inside the extension folder (STFU-Whatsapp/src).
    • Note: Ensure you select the src folder, not the root project folder, as the manifest.json lies inside it.

How it Works

Dual-Layer Muting

  1. Service Worker (background.js): Runs in the background and queries active tabs matching web.whatsapp.com. If a tab is open, it sets the tab's muted state using browser extension APIs. It also displays a "MUTE" badge and changes the extension icon dynamically.
  2. Main World Scripts (contentScriptMain.js): Injected directly into the WhatsApp Web page context. It overrides Audio, document.createElement('audio'), and HTMLAudioElement.prototype.play to programmatically set the volume of notification sound elements to 0 and mute them in real-time. This ensures sidebar panels in Opera/Opera GX get muted even if the browser does not expose them to the tab APIs.

Settings Schema

All settings are synchronized across your browser profile using chrome.storage.sync:

{
  "enabled": true,
  "mode": "everyday",
  "everyday": {
    "enabled": true,
    "start": "22:00",
    "end": "08:00"
  },
  "custom": {
    "monday": { "enabled": true, "start": "22:00", "end": "08:00" },
    "tuesday": { "enabled": true, "start": "22:00", "end": "08:00" },
    "wednesday": { "enabled": true, "start": "22:00", "end": "08:00" },
    ...
  },
  "manualMute": false
}

Authorship

Developed & Redesigned by Fellipe Orsini.

License

Licensed under the MIT License. See LICENSE for details.


Disclaimer: WhatsApp is a trademark of WhatsApp Inc., registered in the U.S. and other countries. This extension is an independent project developed by Fellipe Orsini and has no relationship to WhatsApp or WhatsApp Inc.

About

Silents whatsapp web open tabs in specific time range or until reactivation

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors