GithubHelp home page GithubHelp logo

ludiosarchive / mute-new-tabs Goto Github PK

View Code? Open in Web Editor NEW
16.0 3.0 3.0 101 KB

(Deprecated) Chrome extension that mutes new tabs until you un-mute them or click an in-page volume control

License: MIT License

JavaScript 80.65% HTML 17.66% Shell 1.70%
chrome chrome-extension mute audio

mute-new-tabs's Introduction

Mute New Tabs

Chrome allows websites to make noise with your explicit approval. Mute New Tabs is a Chrome extension that fixes this peculiar design mistake. It uses Chrome's tab muting API to automatically mute new tabs. If needed, you can un-mute a tab by using the context menu on the tab itself.

Note: to restore the "Unmute tab" and "Mute tab" context menu actions in Chrome 64+, disable "Sound content setting" in chrome://flags.

Besides muting new tabs, the extension also:

  1. Mutes tabs on startup, because Chrome doesn't remember which tabs were muted.

  2. Mutes the tab when you navigate to a different origin.

  3. Injects a content script on {youtube, vimeo, soundcloud, twitter}.com (and more) to unmute the tab when you click on an in-page volume control. Clicking a volume control shows a clear intent to change the volume, so the tab mute shouldn't get in the way.

All four features can be toggled in the extension's popup window:

Screenshot of menu showing 'Mute new tabs',
'Mute on origin change', 'Mute all tabs on startup', and
'Unmute when clicking a volume control on a page'

Install from the Chrome Web Store

This extension is available in the Chrome Web Store. Requires Chrome 55+.

If the extension works for you, please leave a review in the store.

How Mute New Tabs uses the permissions it requests.

Install from source

Note that if you install an extension from outside the Chrome Web Store, you'll see a "developer mode extensions" nag popup every time you start Chrome, unless you're using Chrome on Linux (lucky you!). On other platforms, if you're crazy enough, you might be able to hexedit your Chrome binary to get rid of it (I have not tested this).

  1. git clone https://github.com/ludios/mute-new-tabs

  2. Open chrome://flags in Chrome.

  3. Find Sound content setting, click "Disable", then restart Chrome. (Make sure to actually restart it, not just close one window.)

  4. Open chrome://extensions in Chrome.

  5. Check "Developer mode" at the top-right.

  6. Click "Load unpacked extension...", then select the cloned mute-new-tabs directory.

  7. Check "Allow in incognito" if you also want incognito tabs to be muted by default.

Thanks

Thanks to rones for the keep-quiet sign that I've used for the extension icon.

Thanks to @matthiasgoergens for doing the initial setup on the Chrome Web Store and paying the fee.

The epidemic of autoplaying videos

mute-new-tabs's People

Contributors

ivan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mute-new-tabs's Issues

Can't unmute tabs

screen shot 2018-02-02 at 4 37 15 pm

I am unable to un-mute tabs. I don't see an option for "Unmute". I am using Version 64.0.3282.119 (Official Build) (64-bit) on Mac OS X High Sierra.

Tabs sometimes fail to automatically mute in Chrome 54

Possibly related to seeing this error:

Unchecked runtime.lastError while running tabs.update: No tab with id: 625.
function muteTab(tabId) {
    assert(Number.isInteger(tabId));
    chrome.tabs.update(tabId, {muted: true}); // <------
}

Hangouts Video

Video calls are muted.
Unable to find the mute/unmute icon.
Phone calls are OK (not muted)

Google Hangouts 2017.110.418.2 plugin for Google Chrome 56.0.2924.87
OS Win 8.1

NOTE: extension disabled / new permissions

When Chrome updates Mute New Tabs, it sometimes disables the extension and prompts for approval to re-enable it. This happens because the extension requests new permissions to be able to inject the volume-control unmute script for additional domains.

Mute New Tabs does not include any analytics or tracking code, and the code shipped to the Chrome Web Store is identical to the code in this GitHub repository.

Why Mute New Tabs uses these permissions:

mute-new-tabs does not unmute some players

A video in this player can NOT be unmuted by clicking on the video's volume control.
When I clicked "Remove this extension" and removed mute-new-tab, the video's audio began to play at a normal and reasonable level.
While the video was playing, I reinstalled the extension. The volume muted and no amount of clicking on the video's volume control would allow it to play.

SUGGESTION: ADD AN OPTION TO DISABLE mute-new-tabs FOR THIS TAB.
This would allow weird, new, non-compliant audio players to play even when mute-new-tabs doesn't know how to unmute them.

Brightcove Player Version 5.22.4
Video.js Version 5.20.1
Account ID 1509317113
Player ID HJbWPHdb4b
Embed ID default
Application ID

https://www.brightcove.com/en/

Add option to mute all tabs on startup

mute-new-tabs doesn't appear to launch early enough to mute the tabs that Chrome restores on startup, so it needs to iterate over all the tabs and mute them. Chrome doesn't appear to remember the old mute states of the tabs, either.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.