I am developing an extension for Google Chrome.
Chrome has a "Mute tab" function which blocks the sounds from the site. When this function is activated, a "strikeout speaker" icon is shown on the tab.
The task of my extension is to activate this function and to block any sound in this way. How can I do this in JavaScript?
I have learnt, how to do that:
function turn_Off_On_Sound() {
chrome.tabs.query({url: []}, function (tabs) {
for (var i = 0; i < tabs.length; i++) {
var mutedInfo = tabs[i].mutedInfo;
if (mutedInfo) chrome.tabs.update(tabs[i].id, {"muted": true});
}
});
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With