Difference between revisions 38255 and 38256 on test2wiki

/**
 * Keep code in MediaWiki:Common.js to a minimum as it is unconditionally
 * loaded for all users on every wiki page. If possible create a gadget that is
 * enabled by default instead of adding it here (since gadgets are fully
 * optimized ResourceLoader modules with possibility to add dependencies etc.)
 *
 * Since common.js isn't a gadget, there is no place to declare its
 * dependencies, so we have to lazy load them with mw.loader.using on demand and
 * then execute the rest in the callback. In most cases these dependencies will
 * be loaded (or loading) already and the callback will not be delayed. In case a
 * dependency hasn't arrived yet it'll make sure those are loaded before this.
 *
 * Partially copied from https://en.wikipedia.org/w/index.php?title=MediaWiki:Common.js&oldid=510637683
 */
mw.loader.using( 'mediawiki.util', function() {
/* Begin of mw.loader.using callback */


/**
 * WikiMiniAtlas
 *
 *  Description: WikiMiniAtlas is a popup click and drag world map.
 *               This script causes all of our coordinate links to display the WikiMiniAtlas popup button.
 *               The script itself is located on meta because it is used by many projects.
 *               See [[Meta:WikiMiniAtlas]] for more information. 
 *  Maintainers: [[User:Dschwen]]
 */

mw.loader.load('//meta.wikimedia.org/w/index.php?title=MediaWiki:Wikiminiatlas.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400');

/* Test if an element has a certain class
 * Maintainers: [[User:Mike Dillon]], [[User:R. Koot]], [[User:SG]]
 *
 * @deprecated:  Use $(element).hasClass() instead.
 */
 
window.hasClass = ( function() {
    var reCache = {};
    return function (element, className) {
        return (reCache[className] ? reCache[className] : (reCache[className] = new RegExp("(?:\\s|^)" + className + "(?:\\s|$)"))).test(element.className);
    };
})();

/* Helper script for .hlist class in Common.css
 * Last updated: September 3, 2012
 * Maintainer: [[User:Edokter]]
 */
 
if ( $.client.profile().name == 'msie' ) {
    /* Add pseudo-selector class to last-child list items in IE 8 */
(contracted; show full)}

$( createNavigationBarToggleButton );


/* End of mw.loader.using callback */
} );
/* DO NOT ADD CODE BELOW THIS LINE */