User Tools

Site Tools


greasemonkey:ii-mail-check

ii-mail-check

ii-mail-check.user.js
// ==UserScript==
// @name           ii-mail-check
// @namespace      http://enquirer.improbableisland.com/dokuwiki/doku.php?id=greasemonkey
// @author         Tahvohck, modifications by Svedka and Full Metal Lion
// @description    Checks to see if you have mail, and adds an alert if you do.
// @version        3.1
// @match          *://*.improbableisland.com/*
// @exclude        *://enquirer.improbableisland.com/*
// @icon           https://improbableisland.com/favicon.ico
// @grant          none
// ==/UserScript==
 
var Havemail = document.evaluate("//a[@href='mail.php'][@class='hotmotd']", document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;
if (Havemail) {
    var Body = document.evaluate("//body", document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;
    if (Body){
        Body.innerHTML += '<div style="position:fixed; right:10px; bottom:10px; border:1.5px solid #ff0000; padding:5px 5px; text-align:center; background:#dddddd; width:150px; text-decoration:none; border-radius:10px;"><a target="_blank" href="/mail.php">You\'re distracted!</a></div>';
    }
}

Version 2 by Tahvohck

Version 3 by Svedka

greasemonkey/ii-mail-check.txt · Last modified: 2023/11/21 18:04 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki