User:BryghtShadow/global.js

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

if(wgCanonicalSpecialPageName == 'Chat') { //Function for adding messages to the window NodeChatDiscussion.prototype.iconPing = function (chat) { var icon = ''; for(var i in this.model.users.models) { if(this.model.users.models[i].attributes.name == chat.attributes.name) { if(this.model.users.models[i].attributes.isStaff) { icon = ' '; }				else if(this.model.users.models[i].attributes.isModerator) { icon = ' '; }				break; }		}		if(icon) {this.chatUL.children.last.children('.username').html(this.chatUL.children.last.children('.username').html + icon);} if(mainRoom.isInitialized && chat.attributes.name != wgUserName && !chat.attributes.isInlineAlert) { window.dinged = true; //resolve HTML var text = document.createElement('span'); text.innerHTML = chat.attributes.text; text = text.textContent; var pings = document.getElementById('pings').value.removeTrailing('\n').split('\n'); for(var i = 0; i < pings.length; i++) { if(text.toLowerCase.indexOf(pings[i].toLowerCase) != -1 || this != mainRoom.viewDiscussion) { if(!window.hasFocus) { //Only annoy people if the window isn't focused document.getElementById('sound').innerHTML = ' '; if(!window.dinged) {window.ding = setInterval('FlashTitle', 500);} }					this.scrollToBottom; if(this == mainRoom.viewDiscussion) { var ref = text.toLowerCase.indexOf(pings[i].toLowerCase); var phrase = text.slice(ref, ref + pings[i].length); this.chatUL.children.last.children('.message').html(text.replace(phrase, ' ' + phrase + ' ')); }					break; }			}		}		//Kill emoticons this.chatUL.children.last.children('.message img').each(function {this.outerHTML = '' + this.title + ' ';}); } }

/** Common Site Enhancements **/

if (!(wgCanonicalSpecialPageName=="Chat" && skin=="oasis")) { // Don't bother loading for Chat. importScriptPage('DisplayClock/code.js', 'dev'); } importScriptPage('RevealAnonIP/code.js', 'dev');

/** Tools **/ importScriptPage('DupImageList/code.js', 'dev');

/** Site Enhancements **/ importScriptPage( 'SkinSwitchButton/code.js', 'dev' ); importScriptURI('http://dev.wikia.com/wiki/BotoneraPopups/Code/en.js?action=raw&ctype=text/javascript&templates=expand'); importStylesheetPage('BotoneraPopups/code.css', 'dev'); // Create if not exists if (!window.BotoneraPopups) { window.BotoneraPopups = {}; } // Change key binding for opening popup window.BotoneraPopups.displayOnKey = $.extend(true, window.BotoneraPopups.displayOnKey, {ctrlKey: false, altKey: false, shiftKey: true});