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'); Examples of the script: Wikia skin: http://i.imgur.com/BI3Lc.png Monobook: http://i.imgur.com/qgc0O.png if (skin == "oasis") { $.getJSON('http://callofduty.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://callofduty.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-cactions .pBody').append('Latest edit to ' + cgwatch1.split('_').join(' ') + ' was to ' + cgwatch.query.categorymembers[0].title + ' ');	}); }