Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name OWA Tab Highlight On New Mail
- // @namespace
- // @description Highlights OWA tab after receiving new unread email (like gmail)
- // @include https://your-owa-server.com/owa/?mod*
- // ==/UserScript==
- // Times in seconds
- var refreshTime = 5;
- var firstLoadWaitTime = 3;
- function check_unread () {
- // normal message has class="c3"
- // unread message has class="c3 ur"
- unread = document.getElementsByClassName("c3 ur").length;
- if (unread > 0) {
- // Title change causes FF to highlight the tab
- parent.document.title = "("+unread+") Inbox";
- }
- // Pause per refreshTime then check again
- var tm = setTimeout(check_unread, refreshTime*1000);
- }
- var tm = setTimeout(check_unread, firstLoadWaitTime*1000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement