MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */ window.UserTagsJS = { modules: {}, tags: { bureaucrat: { u:'Wiki Official'}, founder: { u:'Creator'}, blocked: { u:'Suspended'}, newuser: { u:'New User'}, inactive: { u: 'Inactive' }, bannedfromchat: {u: 'Suspended From Chat'}, montheditor: { u:'Editor of the Month' }, featured: { u:'Featured User' }, moderator: {u:'Moderator'} } }; UserTagsJS.modules.newuser = { days: 30, // Must have been on the Wiki for 30 days edits: 10, // And have at least 10 edits to remove the tag namespace: 0 // Edits must be made to articles to count };

UserTagsJS.modules.inactive = 30;

$.getJSON("/api/v1/Articles/Top?cb=" + new Date.getTime, function(data) {	var a = data.items; // array of results	$("span.mostvisited").each(function { var b = String(Number($(this).attr("data-limit"))) == "NaN" ? a.length : Number($(this).attr("data-limit")) > a.length ? a.length : Number($(this).attr("data-limit")), // limit (if larger than the results length, override with length of results))			c = [];		for (var i = 0; i < b; i++) {			c.push('\t' + a[i].title + '');			if (i + 1 == b) {				$(this).replaceWith('\n' + c.join("\n") + '\n');			}		}	}); });

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:EditConflictAlert/code.js',    ] });