User:Benjaminthewill123123/watch.js

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://runescape.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);