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 */ All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://test2.wikipedia.org/w/index.php?diff=prev&oldid=38256.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|