MediaWiki:Watchlist.js

/* 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. Examples of the script: Wikia skin: http://i.imgur.com/1T10p.png Monobook: http://i.imgur.com/qgc0O.png var cgscriptloc = cgscriptloc?cgscriptloc:"ul.tools"; var excludeuser = excludeuser?excludeuser:"Wikia"; var refresh = refresh?refresh:30000; var isChat = wgCanonicalSpecialPageName=="Chat" && skin=="oasis"?true:false; function watchlistupdate { $.getJSON('http://sonako.wikia.com/api.php?action=query&list=watchlist&wllimit=1&wldir=older&format=json&wlexcludeuser=' + excludeuser + '&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 (isChat) {	$('#ChatHeader h1.public.wordmark').prepend(' ');	$('head').append('#WatchlistNotify a:hover {text-decoration:underline;} sup {vertical-align:super;font-size:smaller;} '); } else if (skin == "oasis") {	$(cgscriptloc).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', refresh);