Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- *Load BassPlug
- */
- (
- function (){
- var jsCode = document.createElement('script');
- jsCode.setAttribute('id', 'BassPlugDev-js');
- jsCode.setAttribute('src', 'https://raw.github.com/derpthebass/BassPlug/master/BassPlugDev.js');
- document.body.appendChild(jsCode);
- }()
- );
- /**
- * Override appendToChat() to send messages through Emoji
- * (Used closure-compiler to make this 1 line; used a Python script to escape doublequotes)
- */
- setTimeout("function appendToChat(message,from,color){style=\"\";if(color)style='style=\"color:'+color+';\"';if(from)div=$('<div class=\"chat-message\"><span class=\"chat-from\" '+style+\">\"+from+'</span><span class=\"chat-text\" '+style+\">: \"+Emoji.emojify(message)+\"</span></div>\")[0];else div=$('<div class=\"chat-message\"><span class=\"chat-text\" '+style+\" >\"+Emoji.emojify(message)+\"</span></div>\")[0];scroll=false;if($(\"#chat-messages\")[0].scrollHeight-$(\"#chat-messages\").scrollTop()==$(\"#chat-messages\").outerHeight())scroll=true;var curChatDiv=Popout?Popout.Chat.chatMessages:Chat.chatMessages;var s=curChatDiv.scrollTop()>curChatDiv[0].scrollHeight-curChatDiv.height()-20;curChatDiv.append(div);if(s)curChatDiv.scrollTop(curChatDiv[0].scrollHeight)};",2500);
- function getTime(){
- return Date().split(" ")[4];
- }
- /**
- * Override Emoji to manipulate messages
- * Append time, etc.
- * MORE TO COME
- */
- Emoji.emojify = function (text){
- normal=!1;
- if ((text[0]+text[1])===": "){
- normal=!0;
- };
- console.log(getTime()+": "+text)
- return normal? text : " ("+getTime()+"): "+text;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement