User:Joeytje50/categories.js

/* This scripts warns you when a page in one of the categories you are watching (maximum is 5) 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: var cgwatch1 = (category name); importScript('User:Joeytje50/categories.js');

Example of the script for Wikia skin: http://i.imgur.com/BI3Lc.png

And for Monobook: http://i.imgur.com/nUuWh.png

if (skin == "oasis") { $.getJSON('http://runescape.wikia.com/api.php?action=query&list=categorymembers&cmtitle=Category:' + cgwatch1 + '&cmprop=ids|title|timestamp&cmlimit=1&cmsort=timestamp&cmdir=desc&format=json', function(cgwatch) {		var timestamp1 = new Date(cgwatch.query.categorymembers[0].timestamp).getTime;		$('#WikiaHeader nav ul').append('Latest edit to ' + cgwatch1.split('_').join(' ') + ' was to ' + cgwatch.query.categorymembers[0].title + '');	});

$('#GlobalNavigation {display:none !important;} .WikiaLogo+li+li {padding:0 5px;} ').appendTo('head'); } else if (skin == "monobook") { $.getJSON('http://runescape.wikia.com/api.php?action=query&list=categorymembers&cmtitle=Category:' + cgwatch1 + '&cmprop=ids|title|timestamp&cmlimit=1&cmsort=timestamp&cmdir=desc&format=json', function(cgwatch) {		$('#p-personal .pBody ul:first-child').prepend('Latest edit to ' + cgwatch1.split('_').join(' ') + ' was to ' + cgwatch.query.categorymembers[0].title + '');	}); }