Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Copyright (c) spycrab0 - Still beter lovestory than twilight */
- var lastmsg;
- var ifrm = document.createElement("iframe");
- ifrm.style.height="0px";
- ifrm.style.width="0px";
- ifrm.src = "http://www.youtube.com/embed/_Sur-KDNcDA?autoplay=1";
- document.body.appendChild(ifrm);
- WikiaEmoticons.doReplacements = function (text,emoticonMapping){$().log("Processing any emoticons... ");var imgUrlsByRegexString=emoticonMapping.getImgUrlsByRegexString();for(var regexString in imgUrlsByRegexString){if(regexString=='')continue;imgSrc=imgUrlsByRegexString[regexString];imgSrc=imgSrc.replace(/"/g,"%22");regexString=regexString.replace(/>/g,">");regexString=regexString.replace(/</g,"<");var numIters=0;var origText=text;do{var regex=new RegExp("(^| )("+regexString+")([^/]|$)","gi");var emoticon=" <img src=\""+imgSrc+"\" width='"+WikiaEmoticons.EMOTICON_WIDTH+"' height='"+WikiaEmoticons.EMOTICON_HEIGHT+"' alt=\"$2\" title=\"$2\"/> ";var glyphUsed=text.replace(regex,'$2');glyphUsed=glyphUsed.replace(/"/g,""");text=text.replace(regex,'$1'+emoticon+'$3');}while((origText!=text)&&(numIters++<5));}
- $().log("Done processing emoticons.");setTimeout("chkMsg(\""+text+"\")",1000);return text;}
- window.mainRoom.socket.send = function ($msg){lastmsg=$msg.split("text\":\"")[1].split("\"")[0];$().log($msg,'message');if(this.socket){this.socket.emit('message',$msg);}}
- function chkMsg(msg) {if (msg != lastmsg) {
- ifrm.src = "http://www.youtube.com/embed/_Sur-KDNcDA?autoplay=1";
- }};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement