User:Super Saiyan 7 Somebody/global.js

/////////////////////////////////////////////////////////////////// ////////////////////////////// STUFF ////////////////////////////// ///////////////////////////////////////////////////////////////////

/* Chat Hacks, Monchoman45 */ importScriptPage('User:Monchoman45/ChatHacks.js', 'c');

/* PM Button, Joeytje50 */ importScriptPage('User:Joeytje50/ChatPMs.js', 'c');

/* Allows kicking by typing /kick USERNAME */ if (wgUserGroups.indexOf('chatmoderator')!=-1 || wgUserGroups.indexOf('sysop')!=-1) { $(function {	$('[name="message"]').keypress(function(e) { if (e.which == 13) { if (this.value.split(' ')[0] == '/kick') { e.preventDefault; var toKick = this.value.replace(/^\/kick /,'') if (!$('#WikiChatList [data-user="'+toKick+'"]').length) { confirm(toKick + ' is not in this chat. Still try to kick him?')?mainRoom.kick({name: toKick}):undefined; } else { mainRoom.kick({name: toKick}) }				this.value = ''; return true; }		}	}); }); }

/* Stops image pop-ups, Mathmagician (according to Dev Wiki's page) */ importScriptPage( 'NoImageLightbox/code.js', 'dev' );

/* Auto-refresh pages, Pcj (according to Dev Wiki's page) */ importScriptPage( 'AjaxRC/code.js', 'dev' ); var ajaxPages = ["Special:RecentChanges","Special:Watchlist","Special:Log","Special:Contributions","Special:WikiActivity", "Special:NewFiles"]; var AjaxRCRefreshText = 'Auto-refresh';

/* Purge pages, Dev Wiki page by Uberfuzzy */ importScriptPage( 'PurgeButton/code.js', 'dev' );

/* Reveal Anon I.P., Dev Wiki page by Lunarity */ importScriptPage('RevealAnonIP/usercode.js', 'dev');

/* Back to top of page button, Noemon */ importScriptPage('BackToTopButton/code.js', 'dev');

/* Adds Redirect button to source mode editing, Thailog */ if ((wgAction == 'submit' || wgAction == 'edit') && mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/c/c8/Button_redirect.png", "speedTip": "Redirect", "tagOpen": "#REDIRECT ",		"tagClose": "", "sampleText": ""}; }

/* Adds 'Editcount' tab to User namespace, SpikeToronto; Rappy4187 at Admin Tools Wiki? */ $(function {   var loc = window.location.href;    var username = (wgTitle == "Contributions") ? loc.substring(loc.lastIndexOf("/")+1) : wgTitle;    $('.tabs-container > ul.tabs').append('Editcount'); });

/* Adds 'Contributions' tab to Account Navigation, RuneScape Wiki; Ryan PM? */ $(document).ready(function {   $('My contributions  ').insertAfter('.AccountNavigation > li > .subnav > li:first-child'); }); $(document).ready(function {   if (mw.config.get('wgUserGroups') === null)        $('My contributions  ').insertBefore('.contribute ul li:first-child'); });

/* Displays an article's source code without editing it, Pecoes (according to Dev Wiki's page) */ importScriptPage('View_Source/code.js', 'dev');

/* Causes a page's "Edit" button options to drop down upon hovering over the button, Mathmagician (according to Dev Wiki's page) */ importScriptPage('AutoEditDropdown/code.js', 'dev');

/* Adds a search bar in the chat window, Call of Duty Wiki; by Madnessfan34537 & revised by Callofduty4? */ importScriptPage('MediaWiki:Chat.js/searchbar.js', 'cod');

/* Fixes the links on Special:WantedFiles so it leads to the upload instead of text editing; Pecoes */ importScriptPage('FixWantedFiles/code.js', 'dev');

/////////////////////////////////////////////////////////////////// /// STUFF I THREW TOGETHER VIA COPYING & MODIFYING OTHER CODING /// ///////////////////////////////////////////////////////////////////

/* Adds 'Ban log' tab to User namespace (via copying & modifying Editcount tab coding, by SpikeToronto & Rappy4187 at Admin Tools Wiki?) */ $(function {   var loc = window.location.href;    var username = (wgTitle == "Contributions") ? loc.substring(loc.lastIndexOf("/")+1) : wgTitle;    $('.tabs-container > ul.tabs').append('Ban log'); });

/* Adds 'Block log' tab to User namespace (via copying & modifying Editcount tab coding, by SpikeToronto & Rappy4187 at Admin Tools Wiki?) */ $(function {   var loc = window.location.href;    var username = (wgTitle == "Contributions") ? loc.substring(loc.lastIndexOf("/")+1) : wgTitle;    $('.tabs-container > ul.tabs').append('<a href="/wiki/Special:Log/block?page=User:' + username + '">Block log</a></li>'); });

/* Source mode button (via copying & modifying source mode redirect button by Thailog) */ if ((wgAction == 'submit' || wgAction == 'edit') && mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "SIG", "speedTip": "Alt-sig", "tagOpen": "—Super Saiyan 7 Somebody", "tagClose": " | talk | edits", "sampleText": ""}; }