Desktop Notification for OWA 2003

An experimental script to play sound and to show notification for mail arrival on Outlook Web App 2003

// ==UserScript==
// @id             41f11ead-b1c5-4b87-a7d8-403c1fe2904f@scriptish
// @name           Desktop Notification for OWA 2003
// @version        0.3
// @namespace      https://greasyfork.org/scripts/2361-desktop-notification-for-owa-2003
// @author         Ian Chu
// @description    An experimental script to play sound and to show notification for mail arrival on Outlook Web App 2003
// @include        */owa/
// @include        */owa/#
// @run-at         document-end
// ==/UserScript==


(function () {
    var favicon, notifSound;
    var requestPermission = function() {
        Notification.requestPermission(function (status) {
            if (Notification.permission !== status) {
                Notification.permission = status;
            }
            welcome();
        });
    }
    var welcome = function () {
        new Notification(
            'Notification extension for Outlook WebApp', {
                icon: favicon,
                body: 'From now on, when you receive new mail,\n' +
                      'A notification box will appear like this.',
                onclick: function () {
                    window.focus();
                }
            }
        );
    }
    var lastPushedNumber = 0;
    var checkNewMailNotif = function () {
        var lnkNwMl = document.getElementById('lnkNwMl');
        if (lnkNwMl) {
            var pushedNumber = Number(lnkNwMl.getAttribute('_pushed'));
            if (pushedNumber > lastPushedNumber) {
                var newItemDialog = document.getElementById('idNewItmDlg');
                var spans = newItemDialog.getElementsByTagName('span');
                var nwItmTxtFrm, nwItmTxtSbj;
                for (var i = 0; i < spans.length; i++) {
                    if (spans[i].className.indexOf('nwItmTxtFrm') >= 0)
                       nwItmTxtFrm = spans[i];
                    else if (spans[i].className.indexOf('nwItmTxtSbj') >= 0)
                       nwItmTxtSbj = spans[i];
                }
                var mailFrom = nwItmTxtFrm.textContent;
                var mailSubj = nwItmTxtSbj.textContent;
                requestPermission();
                new Notification(mailFrom, {
                    icon: favicon,
                    body: mailSubj,
                    onclick: function () {
                        window.focus();
                        nwItmTxtFrm.click();
                    }
                });
				notifSound.play();
            }
            lastPushedNumber = pushedNumber;
        } else {
            lastPushedNumber = 0;
        }
    }
	
	// --- icon and sound ---
    var linkTags = document.getElementsByTagName('head')[0].getElementsByTagName('link');
    for (var i = 0; i < linkTags.length; i++) {
        if (linkTags[i].getAttribute('rel').indexOf('icon') >= 0) {
            favicon = linkTags[i].getAttribute('href');
            break;
        }
    }
	notifSound = new Audio();
	notifSound.src = 'data:audio/ogg;base64,' +
        'T2dnUwACAAAAAAAAAAAhBwAAAAAAAF1ZYUIBHgF2b3JiaXMAAAAAAUSsAAAAAAAAgDgBAAAAAAC4' +
		'AU9nZ1MAAAAAAAAAAAAAIQcAAAEAAADQQ/V0Di3///////////////+BA3ZvcmJpcx0AAABYaXBo' +
		'Lk9yZyBsaWJWb3JiaXMgSSAyMDA3MDYyMgAAAAABBXZvcmJpcyJCQ1YBAEAAACRzGCpGpXMWhBAa' +
		'QlAZ4xxCzmvsGUJMEYIcMkxbyyVzkCGkoEKIWyiB0JBVAABAAACHQXgUhIpBCCGEJT1YkoMnPQgh' +
		'hIg5eBSEaUEIIYQQQgghhBBCCCGERTlokoMnQQgdhOMwOAyD5Tj4HIRFOVgQgydB6CCED0K4moOs' +
		'OQghhCQ1SFCDBjnoHITCLCiKgsQwuBaEBDUojILkMMjUgwtCiJqDSTX4GoRnQXgWhGlBCCGEJEFI' +
		'kIMGQcgYhEZBWJKDBjm4FITLQagahCo5CB+EIDRkFQCQAACgoiiKoigKEBqyCgDIAAAQQFEUx3Ec' +
		'yZEcybEcCwgNWQUAAAEACAAAoEiKpEiO5EiSJFmSJVmSJVmS5omqLMuyLMuyLMsyEBqyCgBIAABQ' +
		'UQxFcRQHCA1ZBQBkAAAIoDiKpViKpWiK54iOCISGrAIAgAAABAAAEDRDUzxHlETPVFXXtm3btm3b' +
		'tm3btm3btm1blmUZCA1ZBQBAAAAQ0mlmqQaIMAMZBkJDVgEACAAAgBGKMMSA0JBVAABAAACAGEoO' +
		'ogmtOd+c46BZDppKsTkdnEi1eZKbirk555xzzsnmnDHOOeecopxZDJoJrTnnnMSgWQqaCa0555wn' +
		'sXnQmiqtOeeccc7pYJwRxjnnnCateZCajbU555wFrWmOmkuxOeecSLl5UptLtTnnnHPOOeecc845' +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njMJM0AAA==' ;

    // --- Init ---
    welcome();
    requestPermission();
    setInterval(checkNewMailNotif, 1000);
    
}) ();