User:Slayingthehalcyon/global.js

importArticles({   type: 'script',    articles: [        'w:coreychambers:MediaWiki:VectorSkin.js',        'u:dev:MediaWiki:ChatHacks.js',        'u:dev:MediaWiki:AjaxBatchDelete/code.2.js',        'u:dev:MediaWiki:MessageBlocker/code.js',        'u:halyconictests:MediaWiki:TabComplete.js',        'u:halyconictests:MediaWiki:EasyPublish.js',        'u:halcyonictests:MediaWiki:Toraload.js',        'u:halcyonictests:MediaWiki:PseudVector.js',        'u:halcyonictests:MediaWiki:SnowPlow.js',        'u:halcyonictests:MediaWiki:Spells.js',        'u:halcyonictests:MediaWiki:SlashCommands.js'   ]  });

// Skin Switch Button (changing "Start a wikia" in Oasis to it) if (mw.config.get('skin') == 'oasis') { $('.start-wikia').attr('href','/index.php?title='+encodeURIComponent(mw.config.get('wgPageName'))+'&useskin=monobook').text('Monobook'); } else { $('#p-cactions > .pBody > ul > li:last-child').after(   $('').append('Oasis')  ); }

// http://blog.vishalon.net/index.php/javascript-getting-and-setting-caret-position-in-textarea/ function getCaretPos(ctrl) { var CaretPos = 0;   // IE Support if (document.selection) { ctrl.focus ; var Sel = document.selection.createRange ; Sel.moveStart ('character', -ctrl.value.length); CaretPos = Sel.text.length; }   // Firefox support else if (ctrl.selectionStart || ctrl.selectionStart == '0') CaretPos = ctrl.selectionStart; return (CaretPos); } function setCaretPos(ctrl, pos){ if(ctrl.setSelectionRange) {       ctrl.focus; ctrl.setSelectionRange(pos,pos); }   else if (ctrl.createTextRange) { var range = ctrl.createTextRange; range.collapse(true); range.moveEnd('character', pos); range.moveStart('character', pos); range.select; } }

/* Minor Fix */

$('#my-tools-menu').addClass('WikiaMenuElement'); $('.mediawiki').addClass(wgUserName); $('.shortcut > a').attr('title','shortcut'); $('.WikiNav > ul > li:first-child').addClass('liActive'); $('.WikiNav > ul > li').mouseenter(function {	$('.WikiNav > ul > li').removeClass('liActive');	$(this).addClass('liActive'); } );