MediaWiki:Common.js

// ===================================== //       Variables for functions // ===================================== // Ajax auto-refresh ajaxPages = ['Special:RecentChanges', 'Special:WikiActivity', 'Special:Watchlist', 'Special:Log', 'Special:Contributions', 'Special:NewFiles', 'Special:AbuseLog']; AjaxRCRefreshText = 'Refresh'; AjaxRCRefreshHoverText = 'Automatically refresh the page';

// Display Clock window.DisplayClockJS = { format: '%d %B %Y, %2H:%2M:%2S (UTC)', hoverText: 'Click to purge the cache' };

// ===================================== //               Imports // =====================================

// See MediaWiki:ImportJS

// ===================================== //               Others // ===================================== //File Links AutoUpdate if (wgPageName.indexOf("Special:MovePage/File:") != -1 || (wgCanonicalNamespace == "File" && Storage)){ importArticles({       type: "script",        article: "u:dev:MediaWiki:FileUsageAuto-update/code.js"    }); }

// JS from Dragon Age wiki, enque thanks to Tierrie mw.loader.using( ['jquery.cookie']); //wsl.loadScript("http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"); //wsl.loadScript("http://dragonage.wikia.com/index.php?title=MediaWiki:Jquery-ui.min.js&action=raw&ctype=text/javascript"); mw.loader.using( ['jquery.ui.tabs'], function { $( "[class^=portal_vtab]" ).tabs.addClass( "ui-tabs-vertical ui-helper-clearfix" );  $( "[class^=portal_vtab] li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" );  var $tabs = $("#portal_slider").tabs({ fx: {opacity:'toggle', duration:100} } );  $("[class*=portal_sliderlink]").click(function { // bind click event to link $tabs.tabs('select', this.className.match(/portal_sliderlink-(\d+)/)[1]); console.log("Sliding to " + this.className.match(/portal_sliderlink-(\d+)/)[1]); return false; }); $('#portal_next').click(function { $tabs.tabs('select', ($tabs.tabs('option', 'selected') == ($tabs.tabs('length'))-1) ? 0 : $tabs.tabs('option', 'selected') + 1 ); // switch to next tab return false; }); $('#portal_prev').click(function { // bind click event to link $tabs.tabs('select', ($tabs.tabs('option', 'selected') == 0) ? ($tabs.tabs('length')-1) : $tabs.tabs('option', 'selected') - 1 ); // switch to previous tab return false; }); });