User:RinasaurusRex/common.js

// User Tags Test ===================== window.UserTagsJS = { extensions: {}, modules: {}, debug: true }; window.UserTagsJS.extensions.Over100Edits = { start: function(config, username) { var promise = $.ajax({			url: mw.util.wikiScript('api'),			data: {				action: 'parse',				format: 'json',				text: ,				prop: 'text',				disablepp: 1			},			dataType: 'json'		}).then(function(json) {			var num = $(json.parse.text['*']).text.replace(/[^\d]/g, );			// debugger;			if (num) {				if (+num >= 1000) {					return ['platinum-editor-badge', 'platinum-editor'];				} else if (+num >= 500 ){					return ['gold-editor-badge', 'gold-editor'];				} else if (+num >= 200) {					return ['silver-editor-badge', 'silver-editor'];				} else if (+num >= 50) {					return ['bronze-editor-badge', 'bronze-editor'];				}			}			return null;		}); return { tags: { 'platinum-editor': { u: '1000+ Article Edits!' }, 'platinum-editor-badge': { u: '1000+', order: -2 }, 'gold-editor': { u: '500+ Article Edits!' }, 'gold-editor-badge': { u: '500+', order: -2 }, 'silver-editor': { u: '200+ Article Edits!' }, 'silver-editor-badge': { u: '200+', order: -2 }, 'bronze-editor': { u: '50+ Article Edits!' }, 'bronze-editor-badge': { u: '50+', order: -2 }, },			promise: promise };	} }; window.UserTagsJS.modules.Over100Edits = true; // Enable the module importScriptPage('UserTags/code.js', 'dev'); // User Tags Test =====================

// importArticles({ //    type: 'script', //     articles: [ //         'u:dev:MediaWiki:FindAndReplace/code.js', // Find and Replace tool //         'u:dev:MediaWiki:Tooltips.js', // Tooltips //         'u:dev:MediaWiki:RedirectManagement/code.js', //Redirect management //     ] // });