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');

AjaxRCRefreshText = 'Auto-refresh'; AjaxRCRefreshHoverText = 'Automatically refresh the page'; ajaxPages = ["Special:RecentChanges","Special:WikiActivity"]; $(function {	if (wgCanonicalNamespace == 'Message_Wall' && wgAction != 'history') {		if (wgTitle == wgUserName) {			$('.WikiaMainContent').prepend('  Edit greeting	 ');		}	} });

importArticles({ type:'script', articles:[ 'w:c:dev:AjaxBatchDelete/code.js',  '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', ] });

//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 { $('Blessed Pages').insertBefore('.AccountNavigation .subnav li:first'); });

$(function { $('Chamber of Change').insertBefore('.AccountNavigation .subnav li:first'); });

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

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

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

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

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

$(function { $('<a href="/wiki/Special:Contributions/JosephHawk">What Have I Done?</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 (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 // **************

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

function updatetimer(i) { var now = new Date; var then = timers[i].eventdate; var diff = count = Math.floor((then.getTime - now.getTime) / 1000); // catch bad date strings if (isNaN(diff)) { timers[i].firstChild.nodeValue = '** ' + timers[i].eventdate + ' **'; return; }   // determine plus/minus if (diff < 0) { diff = -diff; var tpm = 'T plus '; } else { var tpm = 'T minus '; }   // calcuate the diff var left = (diff % 60) + ' seconds'; diff = Math.floor(diff / 60); if (diff > 0) left = (diff % 60) + ' minutes ' + left; diff = Math.floor(diff / 60); if (diff > 0) left = (diff % 24) + ' hours ' + left; diff = Math.floor(diff / 24); if (diff > 0) left = diff + ' days ' + left timers[i].firstChild.nodeValue = tpm + left; // a setInterval is more efficient, but calling setTimeout // makes errors break the script rather than infinitely recurse timeouts[i] = setTimeout('updatetimer(' + i + ')', 1000); } function checktimers { try { //hide 'nocountdown' and show 'countdown' var nocountdowns = getElementsByClassName(document, 'span', 'nocountdown'); for (var i in nocountdowns) nocountdowns[i].style.display = 'none' var countdowns = getElementsByClassName(document, 'span', 'countdown'); for (var i in countdowns) countdowns[i].style.display = 'inline' //set up global objects timers and timeouts. timers = getElementsByClassName(document, 'span', 'countdowndate'); //global timeouts = new Array; // generic holder for the timeouts, global if (timers.length == 0) return; for (var i in timers) { timers[i].eventdate = new Date(timers[i].firstChild.nodeValue); updatetimer(i); //start it up   } } catch (err) { console.log(err.name + " caught in MediaWiki:Common.js!"); console.log(err.stack); } } addOnloadHook(checktimers);

importArticles({   type: "script",    articles: [        "w:c:dev:Countdown/code.js"    ] });