Extensions Blog Press Contribute Support FAQ Videos Changelog About Contact English Dark mode
Chrome extensions you can't live without!
Extensions Blog Press Contribute Support FAQ Videos About Contact

Automatically detect external Gmail usage

It regularly happens for me that I'm reading through my mails through the regular Gmail interface, usually resulting in having all my mails marked as read. The problem is that after doing this (and closing the tab), the addon doesn't immediately update so it appears you still have unread mail.

It would be very useful if the gmail checker would auto reload whenever it detects that you just left (or deactivated) a Gmail tab.

Something along the lines of this (it needs some check to see if it's actually a gmail tab of course):
chrome.tabs.onUpdated.addListener(function() {
    refreshGmailChecker();
});
chrome.tabs.onActivated.addListener(function() {
<pre style="margin-top: 0px; padding: 5px; border: 0px; font-style: normal; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; width: auto; max-height: 600px; word-wrap: normal; background-color: rgb(238, 238, 238);"><code style="border-width: 0px; border-style: initial; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit; background-color: rgb(238, 238, 238);">    refreshGmailChecker();
});
<pre style="margin-top: 0px; padding: 5px; border: 0px; font-style: normal; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; width: auto; max-height: 600px; word-wrap: normal; background-color: rgb(238, 238, 238);"><code style="border-width: 0px; border-style: initial; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit; background-color: rgb(238, 238, 238);">chrome.tabs.onRemoved.addListener(function() {
    refreshGmailChecker();
});

Comments

This website uses cookies to ensure you get the best experience on our website. More info
Got it!