User:Cblair91/watchlist.js

/* Scabbed off Joeytje50 just so I can use cross-domain work

This script warns you when a page on your watchlist is edited. It shows the person who edited what page, and hovering over gives the summary used. To install this, put the following on your personal js file:

function watchlistupdate { $.getJSON(kv_domain + '/api.php?action=query&list=watchlist&wllimit=1&wldir=older&format=json&wlexcludeuser=Cblair91&wlprop=ids|user|title|comment', function(wlid) {	$('#WatchlistNotify').html('' + wlid.query.watchlist[0].user + ' changed ' + wlid.query.watchlist[0].title + ' [1] [2]') }); } $(document).ready(function{ if(wgCanonicalSpecialPageName == "Chat" && skin == "oasis") {	$('#ChatHeader h1.public.wordmark').prepend(' ');	$('head').append('#WatchlistNotify a:hover {text-decoration:underline;} sup {vertical-align:super;font-size:smaller;} '); } else if (skin == "oasis") {	$('ul.tools').append('');	$('head').append('a#WLNotifyLink:visited {color:#77F !important;} '); } else if (skin == "monobook") {	$('#p-personal .pBody ul:first-child').prepend('');	$('head').append('#p-personal li a#WLNotifyLink {color:#F00 !important;} #p-personal li a#WLNotifyLink:visited {color:#77F !important;} '); } watchlistupdate }) setInterval('watchlistupdate', 30000);