User:Drkdragonz66/global.js

/* add history to the dropdown menu for pages - 3/8/11 */ function HistoryDropdownMenuItem { if ($('ul.wikia-menu-button').length === 0) { $('#WikiaPageHeader a.wikia-button').removeClass('wikia-button').wrap('').wrap(''); $('ul.wikia-menu-button').append(''); }		$('ul.wikia-menu-button ul').append('History'); } addOnloadHook(HistoryDropdownMenuItem);

/* add contribs to user menu - 2/1/11 */

function UserContribsMenuItem { $('ul.AccountNavigation li:first-child ul.subnav li:first-child').after('Contributions'); } addOnloadHook(UserContribsMenuItem);

// ******************* // Custom edit buttons // *******************

if (wgAction == "edit" || wgAction == "submit") {

/***** Custom edit buttons *****/ if (mwCustomEditButtons) {

/* */       mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/callofduty/images/f/f7/Custom-Drk_Signature_button.jpg", "speedTip": "Signature", "tagOpen": "", "tagClose": "", "sampleText": ""}; /* */

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/c/c8/Button_redirect.png", "speedTip": "Redirect", "tagOpen": "#REDIRECT ",       "tagClose": "", "sampleText": "Insert text" }

} }

$(function { $('.masthead-info hgroup h2').insertAfter('.masthead-info hgroup h1').css({display: 'inline',paddingLeft: '10px'});  $('.UserProfileActionButton').prependTo('.masthead-info hgroup').css({float: 'right', padding: '0'}); });

/* 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 && a2.href.indexOf('images.wikia.com') != -1) { var link = wgServer + '/wiki/File:' + a2.href.substring(a2.href.lastIndexOf('/') + 1); a2.setAttribute('href',link); }	} } if(readCookie('globalJS') == 'true' && skin == 'oasis') {addOnloadHook(changeimagelinks);}