User:Josephyr/global.js

if(wgCanonicalSpecialPageName == 'Chat') { function createGroupPM { var users = prompt('Enter comma seperated list of users to start a PM with',''); var users = users.split(','); mainRoom.openPrivateChat(users); } $('form#Write').append('PM'); }

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

importScriptPage('User:Joeytje50/tabinsert.js','rs');

importScriptPage('User:Madnessfan34537/multikick.js', 'callofduty');

importScriptPage('User:Madnessfan34537/quickban.js', 'callofduty');

importScriptPage('PurgeButton/code.js', 'dev');

importScriptPage('QuickCreateUserPage/code.js', 'dev');

importScriptPage('AjaxRC/code.js', 'dev');

importScriptPage('MediaWiki:B3.js', 'monchbox');

importScriptPage('View_Source/code.js', 'dev');

importScriptPage('User:JPhil2.0/QuickTools.js', 'c');

importScriptPage('MediaWiki:WhamAPI.js', 'monchbox');

importScriptPage('ListAdmins/code.js', 'dev');

importScriptPage('User:Callofduty4/ChatHacks.js', 'c');

importScriptPage('User:Sactage/wham.js','vstf');

importScriptPage('User:Joeyaa/wham.js','vstf');

importScriptPage('MarkForDeletion/code.js', 'dev');

importArticles({ type:'script', articles:[ 'w:c:dev:AjaxRC/code.js',  'w:c:dev:CollapsibleEdittools/code.js',  'w:c:dev:CollapsibleInfobox/code.js',  'w:c:dev:RevealAnonIP/code.js', //Reveal Anonymous User IP  'w:c:dev:ShowHide/code.js',  'w:c:dev:DisplayClock/code.js',  'w:c:dev:QuickTools/advanced.js',  'w:c:dev:ListFiles/code.js',  'w:c:dev:HideRail/code.js',    ] });

//Importing all script pages

//Chat Tags importScriptPage('ChatTags/code.js', 'dev');

//Chat Options $.getScript("https://raw.github.com/sactage/wikia-js-snippets/master/ChatOptions.js");

//Chat Message Blocker importScriptPage('MessageBlocker/code.js', 'dev');

// ******************* // Custom Buttons // ******************* $(function { $('Special Pages').insertBefore('.AccountNavigation .subnav li:first'); });

$(function { $('Sandbawx').insertBefore('.AccountNavigation .subnav li:first'); });

$(function { $('Status').insertBefore('.AccountNavigation .subnav li:first'); });

$(function { $('Wikia.js</a></li>').insertBefore('.AccountNavigation .subnav li:first'); });

$(function { $('<a href="/wiki/Special:ListGroupRights">Rights</a></li>').insertBefore('.AccountNavigation .subnav li:first'); });

$(function { $('<a href="/wiki/Special:Leaderboard">Ranking</a></li>').insertBefore('.AccountNavigation .subnav li:first'); });

$(function { $('<a href="/wiki/User blog:JosephHawk">Blawg</a></li>').insertBefore('.AccountNavigation .subnav li:first'); });

$(function { $('<a href="/wiki/Special:Chat">Chat</a></li>').insertBefore('.AccountNavigation .subnav li:first'); });

$(function { $('<a href="/wiki/Special:Following">Following</a></li>').insertBefore('.AccountNavigation .subnav li:first'); });

$(function { $('<a href="/wiki/Special:Contributions/JosephHawk">SitRep</a></li>').insertBefore('.AccountNavigation .subnav li:first'); });

/* change publish to save and rename to move */ function PublishToSave { $('#wpSave').val('Save changes'); $('a[data-id="move"]').html('Move'); } window.onload=PublishToSave // ******************* // Custom edit buttons // *******************

if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/central/images/b/b4/Button_category03.png", "speedTip": "Category", "tagOpen": "[[Category:",    "tagClose": "]]", "sampleText": "Category name"}; } if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/3/3b/Button_template_alt.png", "speedTip": "Template", "tagOpen": "", "sampleText": "Template"}; } if (wgAction == "edit" || wgAction == "submit") { /***** Custom edit buttons *****/ if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/__cb20100502153339/callofduty/images/1/17/Button_Ssig.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": "PAGE"}; } }

// *********************** // End custom edit buttons // ***********************

// ********** // Fastdelete // ********** importScriptPage('FastDelete/code.js', 'dev'); var fdButtons = []; fdButtons[fdButtons.length] = { 'summary': 'Unnecessary ', 'label': 'Unnec'}; fdButtons[fdButtons.length] = { 'summary': 'Off Topic', 'label': 'Off topic'}; fdButtons[fdButtons.length] = { 'summary': 'Spam', 'label': 'Spam'}; fdButtons[fdButtons.length] = { 'summary': 'Housekeeping', 'label': 'Housekeeping'}; // ************** // End Fastdelete // **************

// Imports importScriptURI('http://janitor.wikia.com/index.php?title=User:Sactage/scripts.js&action=raw&ctype=text/javascript'); importScriptURI('http://vstf.wikia.com/index.php?title=User:Sactage/EasyCURangeCalc.js&action=raw&ctype=text/javascript'); importScriptURI("http://internal.vstf.wikia.com/wiki/User:Sactage/MegaCURangeCalc.js?action=raw&ctype=text/javascript"); importArticles({   type: 'script',    articles: [        'u:dev:Message/code.js'    ] });

function importScriptPage (page, server) { var url = '/index.php?title=' + encodeURIComponent(page.replace(/ /g,'_')).replace('%2F','/').replace('%3A',':') + '&action=raw&ctype=text/javascript'; if (typeof server == "string") url = (server.indexOf('://') == -1)?'http://' + server + '.wikia.com' + url:server + url; return importScriptURI(url); } $( function {	$('#my-tools-menu').prepend(' <a href="http://community.wikia.com/wiki/Special:LookupConribs" rel="nofollow">User lookup</a></li>');	$('#my-tools-menu').prepend(' <a href="/wiki/Special:Multiwikifinder" rel="nofollow">Title Finder</a></li>');	$('#my-tools-menu').prepend(' <a href="/wiki/Special:RemoveUserAvatar" rel="nofollow">Remove Avatar</a></li>');	$('#my-tools-menu').prepend(' <a href="http://community.wikia.com/wiki/Special:Phalanx" rel="nofollow">Phalanx</a></li>');	$('#my-tools-menu').prepend(' <a href="/wiki/Special:Nuke" rel="nofollow">Nuke</a></li>');	$('#my-tools-menu').prepend(' <a href="/wiki/Special:Multidelete" rel="nofollow">Multi-delete</a></li>');	$('#my-tools-menu').prepend(' <a href="/wiki/Special:Multilookup" rel="nofollow">IP lookup</a></li>');	$('#my-tools-menu').prepend(' <a href="/wiki/Special:AchievementsCustomize" rel="nofollow">Customize Badges</a></li>'); } );

// Multikick function showPopup { $('body').append('<section style="left: 50%; top: 50px; width: 434px; z-index: 2000000002; margin-left: -222px;" class="modalWrapper" id="masskicker"><button class="close wikia-chiclet-button" onclick="cancelKick"><img src="http://slot2.images.wikia.nocookie.net/__cb57523/common/skins/oasis/images/icon_close.png"> Mass-kick <section class="modalContent"> <form method="" name="" class="WikiaForm "> Enter usernames here, separated by a comma and a space. Tab insert works. <input type="text" name="multikickinput" id="multikickinput" /> <a onclick="kickUsers" class="wikia-button">Kick!</a> <a onclick="cancelKick" id="cancel" class="wikia-button secondary">Cancel</a>  '); $('body').append('<div style="height: 100%; width: 100%; z-index: 2000000001; opacity: 0.65; display: block;" data-opacity="0.65" class="blackout"> '); } function kickUsers { var multikick = $('#multikickinput').val if (multikick.length != 0) { var usersToKick = multikick.split(", "); var i = 0; for (i; i<usersToKick.length; i++) { mainRoom.kick({name:usersToKick[i]}); }		$('#masskicker').remove; $('.blackout').remove; } } function cancelKick { $('#masskicker').remove; $('.blackout').remove; } $('<a id= "multiKickerButton" class="wikia-button" href="javascript:showPopup" style="position:absolute; right:55px; top:22px;">Multikick</a>').appendTo('.Write');

//etc. function FakeTalk { var sub = ['Talk', 'talk']; //pages to check var on = false; for(var i = 0; i < sub.length; i++) { if(wgPageName == 'User:' + wgUserName + '/' + sub[i]) {on = true; break;} }	if(!on) { xhr = new XMLHttpRequest; xhr.open('GET', '/api.php?action=query&prop=info&titles=User:' + wgUserName + '/' + sub.join('|User:' + wgUserName + '/') + '&format=json', true); xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xhr.onreadystatechange = function { if(this.readyState == 4 && this.status == 200) { var pages = JSON.parse(this.responseText).query.pages; for(var i in pages) { if(i > 0 && pages[i].lastrevid > localStorage.getItem('msgwl_' + pages[i].title.substring(pages[i].title.indexOf('/') + 1))) { if(skin == 'oasis') { document.getElementById('WikiaFooter').getElementsByTagName('ul')[0].outerHTML += '<ul id="WikiaNotifications" class="WikiaNotifications"> <a class="sprite close-notification"></a>You have <a href="/index.php?title=' + pages[i].title + '&redirect=no" title="' + pages[i].title + '">new messages</a>. </li></ul>'; }						else { document.getElementById('contentSub').outerHTML += ' You have <a href="/index.php?title=' + pages[i].title + '&redirect=no" title="' + pages[i].title + '">new messages</a> (<a href="/index.php?title=' + pages[i].title + '&diff=cur" title="' + pages[i].title + '">show most recent</a>). ';						}					}				}			}		}		xhr.send; }	else {localStorage.setItem('msgwl_' + wgPageName.substring(wgPageName.lastIndexOf('/') + 1), wgCurRevisionId);} } addOnloadHook(FakeTalk); function AnonIP { var list = document.getElementsByTagName('a'); for(var i in list) { if(list[i].href && list[i].href.indexOf('Special:Contributions/') && list[i].innerHTML == 'A Wikia contributor') { list[i].innerHTML = list[i].href.substring(list[i].href.lastIndexOf('/') + 1, list[i].href.length); }	} } addOnloadHook(AnonIP); function UnusedFiles { $('.gallerytext a').each(function {		$(this).html($(this).attr('title'));	}); }