Skip to content

Instantly share code, notes, and snippets.

@smitmartijn
Created April 4, 2024 10:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smitmartijn/77c52eb47c9fb8dd5b83216c1f2064f8 to your computer and use it in GitHub Desktop.
Save smitmartijn/77c52eb47c9fb8dd5b83216c1f2064f8 to your computer and use it in GitHub Desktop.
chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) {
if (message.action === "googleMeetBringToFront") {
chrome.tabs.query({}, function (tabs) {
let meetFound = false;
for (let i = 0; i < tabs.length; i++) {
if (tabs[i].url.includes('meet.google.com')) {
meetFound = true;
chrome.tabs.update(tabs[i].id, { selected: true });
chrome.windows.update(tabs[i].windowId, { focused: true });
break;
}
}
if (!meetFound) {
console.log('No Google Meet tabs found');
}
});
}
});
@smitmartijn
Copy link
Author

The reason why MuteDeck's Google Chrome extension needs the "tabs" permissions, which is labeled as "Browsing History" in Chrome (awkwardly named).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment