Editing will be locked on December 31st, 2017. All content and images will still be available for the time being. Thank you for 10 years!

MediaWiki:Common.js

From Userpedia
Revision as of 09:46, 20 January 2013 by Neurario (talk | contribs) (Please replace the "collapsible" class for tables with "mw-collapsible" - this functionality is now built-in to MediaWiki)
Jump to: navigation, search
/* Any JavaScript here will be loaded for all users on every page load. */

/** Test if an element has a certain class **************************************
 *
 * Description: Uses regular expressions and caching for better performance.
 * Maintainers: [[User:Mike Dillon]], [[User:R. Koot]], [[User:SG]]
 */

var hasClass = ( function() {
	var reCache = {};
	return function( element, className ) {
		return ( reCache[className] ? reCache[className] : ( reCache[className] = new RegExp( "(?:\\s|^)" + className + "(?:\\s|$)" ) ) ).test( element.className );
	};
})();


/** rotating logo ***************************************************************
 *
 * description: i dont know how to describe it aaa
 * maintainers: 
 */

UPLogo2012Urls = [
        "/images/8/85/UPLogo2012_Aldo.png",
        "/images/5/52/UPLogo2012_Bulbasaur.png",
        "/images/5/54/UPLogo2012_Charmander.png",
        "/images/e/ea/UPLogo2012_CrocodileDippy.png",
        "/images/2/24/UPLogo2012_Gamefreak75.png",
        "/images/6/68/UPLogo2012_Hypnotoad.png",
        "/images/2/2b/UPLogo2012_Mason.png",
        "/images/2/2a/UPLogo2012_MasterCrash.png",
        "/images/7/71/UPLogo2012_MG1.png",
        "/images/d/d6/UPLogo2012_MrBones.png",
        "/images/a/a7/UPLogo2012_MrConcreteDonkey.png",
        "/images/6/6f/UPLogo2012_Neptune.png",
        "/images/9/90/UPLogo2012_Neurario.png",
        "/images/f/f5/UPLogo2012_Smasher.png",
        "/images/e/e3/UPLogo2012_SMB.png",
        "/images/9/9d/UPLogo2012_SonicMario.png",
        "/images/5/55/UPLogo2012_Stoob.png",
        "/images/e/e3/UPLogo2012_Tabuu.png",
        "/images/d/d3/UPLogo2012_Turboo.png",
        "/images/5/5a/UPLogo2012_Xzelion.png",
]