User:Joeytje50/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. To install this, put the following on your personal js file: importScript('User:Joeytje50/watchlist.js'); Examples of the script: Wikia skin: http://i.imgur.com/1T10p.png Monobook: http://i.imgur.com/qgc0O.png if (window.cgscriptloc === undefined) var cgscriptloc = "ul.tools"; if (window.excludeuser === undefined) var cgscriptloc = "Wikia"; if (skin == "oasis") { $.getJSON('http://callofduty.wikia.com/api.php?action=query&list=watchlist&wllimit=1&wldir=older&format=json&wlexcludeuser=' + excludeuser + '&wlprop=ids|user|title|comment', function(wlid) {		$(cgscriptloc).append('' + wlid.query.watchlist[0].user + ' changed ' + wlid.query.watchlist[0].title + '[1] [2]');	}); $('a#WLNotifyLink:visited {color:#77F;} ').appendTo('head'); } else if (skin == "monobook") { $.getJSON('http://callofduty.wikia.com/api.php?action=query&list=watchlist&wllimit=1&wldir=older&format=json&wlexcludeuser=' + excludeuser + '&wlprop=ids|user|title|comment', function(wlid) {		$('#p-personal .pBody ul:first-child').prepend('' + wlid.query.watchlist[0].user + ' changed ' + wlid.query.watchlist[0].title + ' [1] [2]</li>');	}); $('<style type="text/css">#p-personal li a#WLNotifyLink {color:#F00;} #p-personal li a#WLNotifyLink:visited {color:#77F;} ').appendTo('head'); }