Files
2026-07-17 15:05:16 -03:00

10 lines
397 B
JavaScript

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 });
});
}
});