User:DangerousDangerously/global.js

importScriptURI('http://c.wikia.com/index.php?title=User:EnemyPeacemaker/sidebar.js&action=raw&ctype=text/javascript') importScriptURI('http://c.wikia.com/index.php?title=User:EnemyPeacemaker/ClearAutoDelete.js&action=raw&ctype=text/javascript'); importScriptPage('AdvancedOasisUI/code.js', 'dev'); importScriptPage('AjaxRC/code.js', 'dev'); importScriptPage('AjaxUndo/code.js', 'dev'); function ChangeLogoLink {$('#p-logo a').attr('href', '/wiki/Special:RecentChanges')} addOnloadHook(ChangeLogoLink);

// ============================================================ // displayTimer // ============================================================ var refreshDate; function addDate { var UTCDate = ((new Date).toUTCString).replace("GMT", "(UTC)"); $('#showdate').empty.append(' ' + UTCDate.substring(5) + ' '); window.clearTimeout(refreshDate); refreshDate = window.setTimeout(addDate, 5000); } $(document).ready(function {   if (skin == 'oasis')         $(' ').appendTo('#GlobalNavigation');    else        $('#p-personal ul').prepend(' ');    addDate;    refreshDate = window.setTimeout(addDate, 5000);    $('#displayTimer').css({'font-size': "12px"}); }); //

// START SkinChangeButtons function CreateSkinChangeButtons { //Oasis buttons $('div.buttons a:first-child').before('Monobook'); //Monobook buttons $('#p-cactions .pBody ul li:nth-last-child(1)').after('Oasis'); } addOnloadHook(CreateSkinChangeButtons); // END SkinChangeButtons

/* kill image popups */ 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);

/* get all personal code files in chat */ $(setTimeout('ChatCheck', 200)); function ChatCheck { if($('.chat-join button').length != 0) { $('.chat-join button').replaceWith('Join the Chat'); } else { setTimeout('ChatCheck', 200); } } function OpenChatWindow { window.chatwindow = window.open('/wiki/Special:Chat'); window.chatwindow.onload = function {window.chatwindow.$('body').prepend(' <style type="text/css">/*<![CDATA[*/@import "http://community.wikia.com/index.php?title=User:' + wgUserName + '/global.css";/*]]>*/ <style type="text/css">/*<![CDATA[*/@import "' + wgServer + '/index.php?title=User:' + wgUserName + '/wikia.css";/*]]>*/ ');} } importScriptPage('User:Monchoman45/ChatHacks.js', 'community');