Initial Commit
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
chrome.commands.onCommand.addListener((command) => {
|
||||
if (command === "toggle-mute") {
|
||||
chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {
|
||||
if (!tabs || !tabs[0]) return
|
||||
const tab = tabs[0];
|
||||
const isMuted = tab.mutedInfo ? tab.mutedInfo.muted : false;
|
||||
chrome.tabs.update(tab.id, { muted: !isMuted });
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user