MediaWiki:Common.js

mw.loader.using( ['mediawiki.util', 'jquery.client'], function { /* Begin of mw.loader.using callback */

/* Auto updating recent changes opt-in * See w:c:dev:AjaxRC for info & attribution */   AjaxRCRefreshText = 'Auto-refresh'; AjaxRCRefreshHoverText = 'Automatically refresh the page'; ajaxPages = ["Special:RecentChanges","Special:WikiActivity"];

importArticles({       type:'script',        articles:[            'MediaWiki:common.js/levelselect.js',         //Levelselect on Champion pages            'MediaWiki:common.js/tabviewenhancements.js', //TabView enhancements            'u:dev:AjaxBatchDelete/code.2.js',            'u:dev:AjaxRC/code.js',            'u:dev:CollapsibleInfobox/code.js',            'u:dev:ExternalImageLoader/code.js',            'u:dev:OggPlayer.js',            'u:dev:RevealAnonIP/code.js',                 //Reveal Anonymous User IP            'u:dev:ShowHide/code.js',            'u:dev:Tooltips.js'        ]    });

/*    * Sliders using jquery by User:Tierrie in Dragon Age Wiki */   //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 {       $(function { 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.replace("portal_sliderlink_", ""));                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;            }); });   });    /* Username replace function (Template:USERNAME) * Inserts user name into * Originally by User:Splarka * New version by User:Spang * Fixed with JS provided by User:Grunny, thanks! */   $(function {        if(typeof(disableUsernameReplace) !== 'undefined' && disableUsernameReplace || mw.config.get('wgUserName') === null) return;    $("span.insertusername").text(mw.config.get('wgUserName'));    }); /* End of mw.loader.using callback */ });

/* Custom Tooltips for use with the Tooltips/code.js */ var tooltips_list = [ {       classname: 'character_icon', parse: '{'+'{Tooltip/Champion|<#character#>|<#skin#>}}', },   {        classname: 'cc-tooltip', parse: '{'+'{Crowd_control_info|<#type#>}}', },   {        classname: 'skin-icon', parse: '{'+'{Tooltip/Skin|<#param#>}}', },   {        classname: 'skinloading-icon', parse: '{'+'{Tooltip/Skin/Loading|<#param#>}}', },   {        classname: 'item-icon', parse: '{'+'{Tooltip/Item|<#param#>}}', },   {        classname: 'mastery-icon', parse: '{'+'{Tooltip/Mastery|<#param#>}}', },   {        classname: 'spell-icon', parse: '{'+'{Tooltip/Spell|<#param#>}}', },   {        classname: 'passive-progression', parse: '{'+'{Tooltip/Progression|<#size#>|<#values#>|<#levels#>|type=<#type#>|formula=<#formula#>}}', },   {        classname: 'tooltip-sandbox', parse: '{'+'{Tooltip/Sandbox|<#v1#>|<#v2#>|<#v3#>|<#v4#>|<#v5#>|<#v6#>}}', } ]; var tooltips_config = { offsetX: 20, offsetY: 20, waitForImages: true };

/*** Flip Text ***/ mw.hook('wikipage.content').add(function(elem) {   $(".flipText2").hide;    $(".flipText1, .flipText2").click(function { $(".flipText1, .flipText2").toggle; }); });

/* DO NOT ADD CODE BELOW THIS LINE */