User:NOBODY/Wikia.js

// User images notification // http://community.wikia.com/wiki/Thread:476904 if (mediaWiki.config.get("wgAction") === "view" && (!window.localStorage || !window.localStorage.getItem('#NOBODYisawesome'))) { (function ($, mw, window) {		var wgServer = mw.config.get("wgServer"),			wgUserName = mw.config.get("wgUserName");		if (typeof wgUserName !== "string") {			$(createNotification);		} else {			var url = wgServer + "/api.php?action=query&format=json&list=usercontribs&uclimit=50000&ucuser=" + window.encodeURIComponent(wgUserName);

$.get(url, function (data) {				try {					if (data.query.usercontribs.length < 50000) {						$(createNotification);					}				} catch (e) {}			}); }		function createNotification { // HTML for the notification (no wiki markup allowed here, e.g. link here is not HTML) var notificationHTML = ' Registered users, please remember to upload fanart (fan-made Nitrome images) on the Nitrome Fan Fiction Wiki, and personal images (images unrelated to Nitrome) on an external imagehosting site. To embed fanart and personal images, please visit this page '; // add notication into the page $('#NOBODYisawesome').remove; $('body').append(notificationHTML); // close the notification when clicking the x			$(' .close-notification').click(function {				$(' ').remove;				if (window.localStorage) {					window.localStorage.setItem(' ', 'dismissed');				}			}); }	}(jQuery, mediaWiki, window)); }