User:Galadhanu/global.js

$(function{var s=$('*[src*="youtube.com"]');if(s.length){for(i=0;i<s.length;i++){var $s=$(s[i]);$s.attr('src',$s.attr('src').replace(/(autoplay=1)/,).replace(/loop=1/,));}}}); if (mw.config.get('skin') === 'oasis') { $(function {        $("a[data-canonical='wikiactivity']").attr('href', '/wiki/Special:RecentChanges').text('Recent Changes');         if (mw.config.get('wgCityId') == 177) {             $("a[data-canonical='chat']").click(function (event) { event.preventDefault; });        }     }); } if (mw.config.get('wgPageName') == "Special:Torus") { importScriptPage('MediaWiki:Torus.js', 'monchbox'); } importScriptPage('User:Sactage/wham.js','vstf'); importScriptPage("User:Monchoman45/ChatHacks.js", "c"); importScriptURI("http://internal.vstf.wikia.com/wiki/User:Sactage/MegaCURangeCalc.js?action=raw&ctype=text/javascript"); importScriptURI('http://vstf.wikia.com/index.php?title=User:Sactage/EasyCURangeCalc.js&action=raw&ctype=text/javascript'); importScriptURI('http://janitor.wikia.com/index.php?title=User:Sactage/scripts.js&action=raw&ctype=text/javascript'); $(function skinswitcher {  //Made by User: Walrus Rappy_4187   var mods = "";   if (document.URL.indexOf('?') != -1) {     mods = '&' + document.URL.substring(document.URL.indexOf('?') +1);     if (mods.indexOf('&useskin=') != -1) {       mods = mods.replace(/&useskin=\w+/,"");     }   }   switch(mw.config.get( 'skin' )) {     case 'uncyclopedia':     case 'wowwiki':     case 'lostbook':     case 'monobook':       $('Oasis').appendTo('#p-cactions ul');       break;     case 'oasis':     case 'wikia':       $('MB').appendTo('#WikiaPageHeader');       break;   } }); $(function{    $('a[href^="http://community.wikia.com/Special"]').each( function(a,b){ b.href = b.href.replace('Special:','wiki/Special:'); }    );     $('#p-personal .pBody ul').prepend('ChatUltime Modifiche');     if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Contributions' && mw.config.get( 'wgPageName' ).indexOf( '/' ) !== -1 ) {         $( '.chat-ban-log' ).after( $( '' ).attr( {             href: '/index.php?title=Special:Log&type=chatconnect&user=' + escape( mw.config.get( 'wgPageName' ).split( '/' )[1] ),         }).text( 'Registro delle connessioni alla chat' ) ).after( ' | ' );     } }); var ajaxPages = ["Special:RecentChanges", "Special:Log", "Special:AbuseLog", "Special:CheckUserLog"]; var AjaxRCRefreshText = 'Auto-Refresh'; importScriptPage('AjaxRC/code.js', 'dev'); /* This moves the toolbox right below the logo... */ $(function {    $('#p-logo').after($('#p-tb').detach);     $('#p-tb').after($('#p-search').detach); });