User Functions
Don't have an account yet? Sign up as a New User
Lost your password?
|
Enquirer Home Page | Twitter | Back to Improbable Island
- 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

|