User:Hyperborean/global.js

importScriptPage('User:Monchoman45/ChatHacks.js', 'c'); importScriptPage('User:Joeytje50/ChatPMs.js', 'c'); importScriptPage("User:Madnessfan34537/multikick.js","cod");

importArticles({	type:'script',	articles: [		"w:c:dev:DisplayClock/code.js",		"w:c:dev:AntiUnicruft/code.js",		"w:c:dev:RevealAnonIP/usercode.js",		"w:c:dev:AjaxUndo/code.js",	] });

window.wgEnableImageLightboxExt = false; function changeimagelinks { $('#WikiaArticle, .LatestPhotosModule, #article-comments').unbind('click.lightbox'); var a = document.getElementsByTagName('a'); for(var t = 0; t < a.length; ++t) { var a2 = a[t]; var img = a2.getElementsByTagName('img'); if(img[0] != null) { if (a2.href.indexOf('images.wikia.com') != -1) { var link = wgServer + '/wiki/File:' + a2.href.substring(a2.href.lastIndexOf('/') + 1); a2.setAttribute('href',link); }		}	} } addOnloadHook(changeimagelinks);

$( function {	if ( !document.getElementById( 'ca-skins' ) ) {		if ( skin === 'oasis' || skin === 'wikia' ) {			$( 'MB' ).appendTo( '#AccountNavigation' ); $( 'WM' ).appendTo( '#AccountNavigation' );		} else {			$( 'Oasis' ).appendTo( '#p-cactions > .pBody > ul' ); $( 'Mobile' ).appendTo( '#p-cactions > .pBody > ul' );		} 	} } );

jQuery(function($) {   "use strict";    var mw = window.mediaWiki || { config: { get: function(p) { return window[p]; } } };    if (mw.config.get('wgCanonicalSpecialPageName') !== 'WikiActivity') return;    var pagelist = ["User:Hyperborean/", "Camp Half-Blood Wiki"];     $("#wikiactivity-main a.title").each(function { var i, l = pagelist.length, $this = $(this), t = $this.text; for (i = 0 ; i < l ; ++i) if (t === pagelist[i]) $this.closest('li').css('display', 'none'); }); }); $(document).ready(function {   if ( skin == 'oasis' )        $( 'UL#AccountNavigation' ).prepend( '<a href="/wiki/Special:Mypage/global.js" style="font-size:12px">Mypage/global.js</a></li>' ); }); $(document).ready(function {   if ( skin == 'oasis' )        $( 'UL#AccountNavigation' ).prepend( '<a href="/wiki/Special:Mypage/Sandbox" style="font-size:12px">Sandbox</a></li>' ); }); $(document).ready(function {   if ( skin == 'oasis' )        $( 'UL#AccountNavigation' ).prepend( '<a href="/wiki/MediaWiki:Wikia.css" style="font-size:12px">Wikia.css</a></li>' ); }); $(document).ready(function {   if ( skin == 'oasis' )        $( 'UL#AccountNavigation' ).prepend( '<a href="/wiki/MediaWiki:Common.js" style="font-size:12px">Common.js</a></li>' ); });

$(document).ready(function {   if ( skin == 'oasis' )        $( 'UL#AccountNavigation' ).prepend( '<a href="/wiki/MediaWiki:Wikia.js" style="font-size:12px">Wikia.js</a></li>' ); });

function EditGreeting { if (wgCanonicalNamespace == 'Message_Wall' && wgAction != 'history') { if (wgTitle == wgUserName) { $('.WikiaMainContent').prepend(' <a accesskey="e" href="/wiki/Message_Wall_Greeting:'+ wgUserName +'?action=edit" class="wikia-button" data-id="edit" id="talkArchiveEditButton" style="padding-left: 5px; padding-right: 8px;"><img alt="" class="sprite edit-pencil" height="16" src="data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D" width="22"> Edit greeting	</a> '); }	} } addOnloadHook(EditGreeting);

function SetAjaxRollback { $('a.mw-rollback-link').click(function(e) {		e.preventDefault;		var $rblink = $(this);		var href = this.getElementsByTagName('a')[0].href;		this.innerHTML = ' <img src="http://images2.wikia.nocookie.net/dev/images/8/82/Facebook_throbber.gif" style="vertical-align: baseline;" border="0" alt="Rollbacking..." />';		$.ajax({ url: href, success: function { $rblink.text(function (i, val) {return val + ' [success]';}); loadPageData; },			error: function { $rblink.text(function (i, val) {return val + ' [failed]';}); loadPageData; }		});	}); } if(readCookie('globalJS') == 'true') {addOnloadHook(SetAjaxRollback);}