Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
JavaScript urls for use on kongregate.com; for use on a page with chat unless otherwise stated
// fix the kong bot message bug
javascript:ChatDialogue.prototype.receivedPrivateMessage=holodeck.activeDialogue().receivedPrivateMessage=function (a){if(a.data.success){this.displayUnsanitizedMessage(a.data.from,this.sanitizeIncomingMessage(a.data.message)+'&nbsp; (<a class="reply_link" onclick="holodeck.insertPrivateMessagePrefixFor(\''+a.data.from+'\');return false;" href="#">reply</a>)',{"class":"whisper received_whisper"})}else{this.kongBotMessage(a.data.to+" can not be reached. Please try again later.")}};void(0)
// list your muted users
javascript:var a=0,b=holodeck._chat_window._mutings,s="",q=$("sky-muted"),p;for(p in b){s+=p+(++a%(12)?'  |  ':'<br/>')};a="<center>"+a+" users muted:<br/>"+s.substr(0,s.length-5)+"</center>";!q?$("global").innerHTML+=('<span id="sky-muted">'+a+"</span>"):q.innerHTML=a;void(0);
// clear active chat
javascript:holodeck.activeDialogue().clear();void(0);
// remove ads -- can be used on any page
javascript:while(T=$$(".ad")[0]){T.remove()};void(0);
// fix scrolling
javascript:((T=holodeck.activeDialogue()).scrollToBottom=function(){var T=this._message_window_node;T.scrollTop=T.scrollHeight+20}).call(T);void(0);
// exit game chat
javascript:var T=holodeck.chatWindow();if(T._logged_in_to_chat&&T._joined_room_types.game) {var b=T._recent_game_room;name=b._short_room_name;if(T._active_room==b){T.toggleRooms()}T._recent_game_room=T._rooms.unset(b._room.id);b.destroy();delete b;T._joined_room_types.game=false;while(T=$$(".room_toggle_action")[0]){T.remove()}}void(0);
// display length of time connected to chat
javascript:function getTimeConn(){return new Date().getTime()-ls};function formatTime(a){a/=1000;var t=Math.floor(a/86400);return t+" day" +(t==1?"":"s")+ " "+Math.floor(a/3600%(24))+":" +Math.floor(a/60%(60))+ ":"+Math.floor(a%(60))+""};holodeck.activeDialogue().displayUnsanitizedMessage("Info",'You have been connected to chat for &nbsp; &nbsp; <a style="color:#000" class="reply_link" onclick="this.innerHTML=formatTime(getTimeConn());return false;" href="#">'+ formatTime(getTimeConn()) +'</a>',{"class":"whisper received_whisper"},{non_user:true});void(0);
// muted users red even when afk
javascript:$("gamepage_header").innerHTML+="<style>#kong_game_ui .user_row.away.muted .username{color:#844 !important}</style>";void(0);
// reconnect instantly when applicable, refresh when login is expired
javascript:(function(){var i=holodeck;i.registerKonduitCallback(KonduitEvent.DISCONNECT,function(l){if(l.data.banned){}else if(l.data.conflict){i.closeAlertTab();i.reconnect();$('session_conflict_content_for_chat_tab').getElementsByTagName('input')[0].onclick();}else if(l.data.login_failed){if(window.location.href.indexOf("?")!=-1){window.location.href+="&"+window.location.href.lastIndexOf('&');return;}window.location.href+="?room_id="+i.chatWindow()._recent_chat_room._room.xmpp_name;}else{i.closeAlertTab();i.reconnect();$('session_conflict_content_for_chat_tab').getElementsByTagName('input')[0].onclick();}});})();
// reconnect instantly when applicable, do not refresh when login is expired
javascript:(function(){var i=holodeck;i.registerKonduitCallback(KonduitEvent.DISCONNECT,function(l){if(l.data.banned){}else if(l.data.conflict){i.closeAlertTab();i.reconnect();$('session_conflict_content_for_chat_tab').getElementsByTagName('input')[0].onclick();}else if(l.data.login_failed){}else{i.closeAlertTab();i.reconnect();$('session_conflict_content_for_chat_tab').getElementsByTagName('input')[0].onclick();}});})();
// reply to pms with /r
javascript:holodeck._chat_commands["r"]=[function(l,n){var k=n.match(/^\/([\S]+)\s+([\s\S]+)$/)||[],o=k[2],r=l.chatWindow(),q=l.activeDialogue(),s=q.lastWhisper||l.username();if(s&&o){if(q){q.sendPrivateMessage(s,o)}else{r.sendPrivateMessage(s,o)}}return false}];holodeck.activeDialogue().receivedPrivateMessage=ChatDialogue.prototype.receivedPrivateMessage=function(a){if(a.data.success){var b=this.lastWhisper=a.data.from;this.displayUnsanitizedMessage(b,this.sanitizeIncomingMessage(a.data.message)+'&nbsp; (<a class="reply_link" onclick="holodeck.insertPrivateMessagePrefixFor(\''+b+'\');return false;" href="#">reply</a>)',{"class":"whisper received_whisper"})}else{this.displayMessage("Kong Bot",a.data.to+" can not be reached. Please try again later.",{"class":"whisper received_whisper"},{non_user:true})}};void(0);
// make all rooms enter-able
javascript:var a=0,b=$$(".full");while(TEMP=b[a++]){TEMP.className=TEMP.className.replace(/\s*full\s*/,'')}void(0);
// get list of room ids, see:
http://gist.github.com/263541
// basically remove the user limit on rooms
javascript:ChatRoomGroup.MAX_USERS_ALLOWED=Infinity;void(0)
// user sorter: you > admins > friends > afk friends > mods > afk mods > users > afk users > muted/silenced
javascript:var a=0,t=ChatRoom.prototype.userSorter = function () {var e = this._chat_window,youSort = function (l) {return e.username() == l.username;},userSort = function (l) {return ("participant"==l.variables.role)&&!(KonduitPresenceType.AWAY==l.variables.presence);},adminSort = function (l) {return l.variables.admin;},caseSort = function(m,l){return m.username.toLowerCase().localeCompare(l.username.toLowerCase())},moderatorSort = function (l) {return !l.variables.admin&&l.variables.moderator&&!(KonduitPresenceType.AWAY==l.variables.presence);},afkModeratorSort = function (l) {return !l.variables.admin&&l.variables.moderator&&(KonduitPresenceType.AWAY==l.variables.presence);},friendSort = function (l) {return e.isFriend(l)&&!(KonduitPresenceType.AWAY==l.variables.presence);},afkFriendSort = function (l) {return e.isFriend(l)&&(KonduitPresenceType.AWAY==l.variables.presence);},mutedSort = function (l) {return !e.isMuted(l);},guestSort = function (l) {return !e.isGuest(l);},awaySort = function (l) {return KonduitPresenceType.AWAY==l.variables.presence;},sortSort = function (p, o, n) {var m = p(o), l = p(n);if (m && !l) {return -1;}if (!m && l) {return 1;}return 0;};return function (m, l){return sortSort(youSort, m, l) || sortSort(adminSort, m, l) || sortSort(friendSort, m, l) || sortSort(afkFriendSort, m, l) || sortSort(moderatorSort, m, l) || sortSort(afkModeratorSort, m, l) || sortSort(userSort, m, l) || caseSort(m, l) || sortSort(awaySort, m, l) || sortSort(guestSort, m, l) || sortSort(mutedSort, m, l)}};holodeck.chatWindow()._rooms.each(function(T){T.value.userSorter=t});var t=$("konduit").nextElementSibling;$("konduit").outerHTML="<div id=\"konduit\"></div>";holodeck.chatWindow()._active_room.destroy();holodeck.showDisconnectedIndicator();$("chat_default_content").show();holodeck.updateDefaultChatTabMessage("Reloading Chat...");eval(t.innerHTML+$("google_ads_div_kong_bumper_preroll_600x400").nextElementSibling.innerHTML);void(0)
// make all links and link-like things clickable links
javascript:(function(){var t=ChatDialogue.prototype.sanitizeIncomingMessage=function(b){b=b.escapeHTML();var TLDs = [".AC", ".AD", ".AE", ".AERO", ".AF", ".AG", ".AI", ".AL", ".AM", ".AN", ".AO", ".AQ", ".AR", ".ARPA", ".AS", ".ASIA", ".AT", ".AU", ".AW", ".AX", ".AZ", ".BA", ".BB", ".BD", ".BE", ".BF", ".BG", ".BH", ".BI", ".BIZ", ".BJ", ".BL", ".BM", ".BN", ".BO", ".BR", ".BS", ".BT", ".BV", ".BW", ".BY", ".BZ", ".CA", ".CAT", ".CC", ".CD", ".CF", ".CG", ".CH", ".CI", ".CK", ".CL", ".CM", ".CN", ".CO", ".COM", ".COOP", ".CR", ".CU", ".CV", ".CX", ".CY", ".CZ", ".DE", ".DJ", ".DK", ".DM", ".DO", ".DZ", ".EC", ".EDU", ".EE", ".EG", ".EH", ".ER", ".ES", ".ET", ".EU", ".FI", ".FJ", ".FK", ".FM", ".FO", ".FR", ".GA", ".GB", ".GD", ".GE", ".GF", ".GG", ".GH", ".GI", ".GL", ".GM", ".GN", ".GOV", ".GP", ".GQ", ".GR", ".GS", ".GT", ".GU", ".GW", ".GY", ".HK", ".HM", ".HN", ".HR", ".HT", ".HU", ".ID", ".IE", ".IL", ".IM", ".IN", ".INFO", ".INT", ".IO", ".IQ", ".IR", ".IS", ".IT", ".JE", ".JM", ".JO", ".JOBS", ".JP", ".KE", ".KG", ".KH", ".KI", ".KM", ".KN", ".KP", ".KR", ".KW", ".KY", ".KZ", ".LA", ".LB", ".LC", ".LI", ".LK", ".LR", ".LS", ".LT", ".LU", ".LV", ".LY", ".MA", ".MC", ".MD", ".ME", ".MF", ".MG", ".MH", ".MIL", ".MK", ".ML", ".MM", ".MN", ".MO", ".MOBI", ".MP", ".MQ", ".MR", ".MS", ".MT", ".MU", ".MUSEUM", ".MV", ".MW", ".MX", ".MY", ".MZ", ".NA", ".NAME", ".NC", ".NE", ".NET", ".NF", ".NG", ".NI", ".NL", ".NO", ".NP", ".NR", ".NU", ".NZ", ".OM", ".ORG", ".PA", ".PE", ".PF", ".PG", ".PH", ".PK", ".PL", ".PM", ".PN", ".PR", ".PRO", ".PS", ".PT", ".PW", ".PY", ".QA", ".RE", ".RO", ".RS", ".RU", ".RW", ".SA", ".SB", ".SC", ".SD", ".SE", ".SG", ".SH", ".SI", ".SJ", ".SK", ".SL", ".SM", ".SN", ".SO", ".SR", ".ST", ".SU", ".SV", ".SY", ".SZ", ".TC", ".TD", ".TEL", ".TF", ".TG", ".TH", ".TJ", ".TK", ".TL", ".TM", ".TN", ".TO", ".TP", ".TR", ".TRAVEL", ".TT", ".TV", ".TW", ".TZ", ".UA", ".UG", ".UK", ".UM", ".US", ".UY", ".UZ", ".VA", ".VC", ".VE", ".VG", ".VI", ".VN", ".VU", ".WF", ".WS", ".YE", ".YT", ".YU", ".ZA", ".ZM", ".ZW"], REGEX = new RegExp("(((http|ftp)s?:\\/\\/)?((\\S+)\\.)?([a-z0-9][a-z0-9-]{0,61}[a-z0-9]|[a-z0-9]{1,2})\\.(("+TLDs.reverse().join("|").toLowerCase().replace(/\./g, "")+")(:\\d+)?(/\\S*)?))", "ig"),t=this;try{var c=REGEX.exec(b)[3];if(c!="http"&&c!="ftp"){c="http://"}else{c=""};b=b.replace(REGEX, "<a href=\""+c+"$1\" target=\"_blank\">$1</a>")}catch(e){}return b};holodeck.chatWindow()._rooms.each(function(T){T.value._chat_dialogue.sanitizeIncomingMessage=t})})();void(0)
// make all messages 'proper' case
javascript:function iterate(a,b){a=a.split(b);return a.each(function(c,d){this[d]=this[d].split("");this[d]=this[d].each(function(c,a){if(this[a]=='i'&&(this[a+1]?this[a+1].match(/^[a-z]/i):true)&&(this[a-1]?this[a-1].match(/^[a-z]/i):true)){}if(this[a].match(/[a-z]/i)&&(this[a+1]?this[a+1].match(new RegExp("[^"+b.toLowerCase().replace(/(\[|\]|\-|\*|\+|\?|\{|\|\(|\)|\}|\.)/g, '\\$1')+']',"i")):true)){this[a]=this[a].toUpperCase();throw $break}},this[d]).join("")},a).join(b)}function Caps(a){a=a.toLowerCase();['.','?',';','*',':','-','_']._each(function(b){a=iterate(a, b)});return a.replace(/([^a-z])i([^a-z])/i,'$1I$2')};(function(){var g=holodeck.activeDialogue().displayMessage.bind(holodeck.activeDialogue());holodeck.activeDialogue().displayMessage = function(e,d,a,b){g(e,(function(d){return Caps(d)})(d),a,b)}})();void(0)
// friend-icon returned to a star
javascript:(function(){var t = document.createElement('span');t.update("<style>.user_row .friend_icon {background: transparent url(/images/presentation/yourrating.gif) no-repeat scroll 0px -12px !important;line-height:12px !important;margin-top:2px;width:14px !important;}</style>");$('gamepage_header').appendChild(t)})();void(0)
// friends names appear green in chat
javascript:(function(){var q=holodeck.activeDialogue().displayUnsanitizedMessage.bind(holodeck.activeDialogue());holodeck.activeDialogue().displayUnsanitizedMessage = function(e,d,a,b){if(!a){a={}}if(this._user_manager.isFriend(e)){a['class']?a['class']+=" friend_message":a['class']="friend_message"};return q(e,d,a,b)};var t = document.createElement('span');t.update("<style>#kong_game_ui .friend_message .chat_message_window_username{ color:#288855 !important }</style>");$('gamepage_header').appendChild(t)})();void(0)
// change the colour of pm text - default is purple
javascript:try{var color = "purple";}catch(q){};(function(){var t = document.createElement('span');t.update("<style>.whisper {color:"+(typeof color=='string'?(color||'purple'):'purple')+" !important;}</style>");$('gamepage_header').appendChild(t)})();void(0)
// mods names appear orange in chat
javascript:(function(){var q=holodeck.activeDialogue().displayUnsanitizedMessage.bind(holodeck.activeDialogue());holodeck.activeDialogue().displayUnsanitizedMessage = function(e,d,a,b){if(!a){a={}}if((this._user_manager.activeRoom().user(e)||{variables:{moderator:false}}).variables.moderator&&!this._user_manager.isAdmin(e)){a['class']?a['class']+=" mod_message":a['class']="mod_message"};return q(e,d,a,b)};var t = document.createElement('span');t.update("<style>#kong_game_ui .chat_message_window .mod_message .chat_message_window_username{ color:#BA6328 !important }</style>");$('gamepage_header').appendChild(t)})();void(0)
// beep when you are pmed or someone says your name in chat while you're afk
javascript:$('gamepage_header').innerHTML+='<span><object type="application/x-shockwave-flash" data="http://www.swfcabin.com/swf-files/1255396997.swf" width="1" height="1" id="Beep_AFK" style="position: absolute; top: 0px; left: 0px; height: 1px; width: 1px; visibility: visible;"><param name="allowscriptaccess" value="always"><param name="allownetworking" value="all"></object></span>';function listner(obj){var type=obj.type,chatWindow=holodeck.chatWindow(),user=chatWindow.activeRoom().user(holodeck.username()),afk=user.variables.presence==KonduitPresenceType.AWAY,regex=new RegExp("("+holodeck.username().toLowerCase()+")","i");obj=obj.data;switch(type){case KonduitEvent.ROOM_MESSAGE:if(afk&&!chatWindow.isMuted(obj.user.username)&&obj.message.match(regex)){$('Beep_AFK').play();}break;case KonduitEvent.PRIVATE_MESSAGE:if(afk&&!chatWindow.isMuted(obj.from)){$('Beep_AFK').play();}break;}};setTimeout((function(){$('Beep_AFK').play();}), 7000);holodeck._event_dispatcher.register(KonduitEvent.ROOM_MESSAGE, function(a){listner(a)});holodeck._event_dispatcher.register(KonduitEvent.PRIVATE_MESSAGE, function(a){listner(a)});""+holodeck._event_dispatcher.register;alert("This is required to make sure chat doesn't break, no idea why.");void(0);
// modify the above script to always beep when pm'd or your name is said instead of just when you're afk
javascript:function listner(obj){var type=obj.type,chatWindow=holodeck.chatWindow(),user=chatWindow.activeRoom().user(holodeck.username()),afk=true,regex=new RegExp("("+holodeck.username().toLowerCase()+")","i");obj=obj.data;switch(type){case KonduitEvent.ROOM_MESSAGE:if(afk&&!chatWindow.isMuted(obj.user.username)&&obj.message.match(regex)){$('Beep_AFK').play();}break;case KonduitEvent.PRIVATE_MESSAGE:if(afk&&!chatWindow.isMuted(obj.from)){$('Beep_AFK').play();}break;}};void(0)
// update site status
javascript:SiteStatsUpdater.update();void(0)
// colour your name purple, by default
javascript:try{var nameColour="purple"}catch(e){};var q=holodeck.activeDialogue().displayUnsanitizedMessage.bind(holodeck.activeDialogue());holodeck.activeDialogue().displayUnsanitizedMessage = function(e,d,a,b){if(!a){a={}}if(d.match(new RegExp(holodeck.username().toLowerCase(), "i"))){d=d.replace(new RegExp("(\\b"+holodeck.username().toLowerCase()+"\\b)", "i"), "<span style=\"color:"+(nameColour||"purple")+"\">$1</span>");a['class']?a['class']+=" name_message":a['class']="name_message"};return q(e,d,a,b)};void(0)
// script to keep current view of users from scrolling; (to see it, scroll down near the bottom and watch as users enter/leave, then use it and watch)
javascript:(function(){holodeck.userRowHeight=(function(){var a={innerHTML:""},i = 0;do{(a=$$('.user_row')[i])||alert("Error");}while((!a.innerHTML.match(new RegExp(holodeck.username())))&&(++i));return(a.clientHeight);})();var a=ChatRoom.prototype,x=a.userLeft,z=a.userJoined;a.userLeft = function(b){var a=(function(b,q){return $(q.usernameNodeId(b)).offsetTop - $(q.usernameNodeId(holodeck.username())).offsetTop;})(b.data.user.username,this),c=this._users_in_room_node;if(c.scrollTop>a){c.scrollTop-=holodeck.userRowHeight;}x.apply(this,arguments);};a.userJoined = function(b){z.apply(this,arguments);var a=(function(b,q){return $(q.usernameNodeId(b)).offsetTop - $(q.usernameNodeId(holodeck.username())).offsetTop;})(b.data.user.username,this),c=this._users_in_room_node;if(c.scrollTop>a){c.scrollTop+=holodeck.userRowHeight;}};})();void(0);
// automatically reconnect to chat, refresh if session expired
javascript:(function(){var i=holodeck;i.registerKonduitCallback(KonduitEvent.DISCONNECT,function(l){if(l.data.banned){}else if(l.data.conflict){i.closeAlertTab();i.reconnect();$('session_conflict_content_for_chat_tab').getElementsByTagName('input')[0].onclick();}else if(l.data.login_failed){if(window.location.href.indexOf("?")!=-1){window.location.href+="&"+window.location.href.lastIndexOf('&');return;}window.location.href+="?room_id="+(holodeck.chatWindow()._recent_chat_room._room.id);}else{i.closeAlertTab();i.reconnect();$('session_conflict_content_for_chat_tab').getElementsByTagName('input')[0].onclick();}});})();
// automatically reconnect to chat, NO refresh if session expired
javascript:(function(){var i=holodeck;i.registerKonduitCallback(KonduitEvent.DISCONNECT,function(l){if(l.data.banned){}else if(l.data.conflict){i.closeAlertTab();i.reconnect();$('session_conflict_content_for_chat_tab').getElementsByTagName('input')[0].onclick();}if(l.data.login_failed){}else{i.closeAlertTab();i.reconnect();$('session_conflict_content_for_chat_tab').getElementsByTagName('input')[0].onclick();}});})();
// pseudo-proper-case messages you send
javascript:function iterate(a,b){a=a.split(b);return a.each(function(c,d){this[d]=this[d].split("");this[d]=this[d].each(function(c,a){if(this[a]=='i'&&(this[a+1]?this[a+1].match(/^[a-z]/i):true)&&(this[a-1]?this[a-1].match(/^[a-z]/i):true)){}if(this[a].match(/[a-z]/i)&&(this[a+1]?this[a+1].match(new RegExp("[^"+b.toLowerCase().replace(/(\[|\]|\-|\*|\+|\?|\{|\|\(|\)|\}|\.)/g, '\\$1')+']',"i")):true)){this[a]=this[a].toUpperCase();throw $break}},this[d]).join("")},a).join(b)}function Caps(a){a=a+" ";['.','?',';','*',':','_','!']._each(function(b){a=iterate(a, b)});return a.replace(/([^a-z])i([^a-z])/g,'$1I$2').replace(/([^a-z])i([^a-z])/g,'$1I$2').substring(0,a.length-1)};var b = holodeck.chatWindow().activeRoom()._chat_dialogue, c = holodeck.chatWindow().activeRoom().sendRoomMessage.bind(holodeck.chatWindow().activeRoom()); b._onInputFunction = function(i){c(Caps(i))};void(0)
// add a /hug command to chat
javascript:holodeck.addChatCommand("hug", function(b,d){var msg = (d.match(/\/hug\s*(.+)/i)||[0,0])[1];if(msg){dispatchToKonduit({type:KonduitEvent.ROOM_MESSAGE,data:{message:"*hugs " + msg + "*",room:holodeck.chatWindow()._active_room._room}});return false} else {return true}});void(0)
// add a /prod command to chat
javascript:holodeck.addChatCommand("prod", function(b,d){var msg = (d.match(/\/prod\s*(.+)/i)||[0,0])[1];if(msg){dispatchToKonduit({type:KonduitEvent.ROOM_MESSAGE,data:{message:"*prods " + msg + "*",room:holodeck.chatWindow()._active_room._room}});return false} else {return true}});void(0)
// info message for specific list of people on-join;
// "/listen <name>" to add someone, "/unlisten <name>" to stop listening. you can have up to 5 comma separated names per usage.
// "/list <regex>" search list of users and display those that match regex, regex is optional
// ie. "/list n" to find every name that has "n" in it, "/list ^n" to find every name that starts with n
// "/list n$" to find every name that ends with n, "/list [0-9]" to find every name with a number in it
javascript:var _userList="";$('header').innerHTML+="<style>.InfoMessage{font-weight:bold;background-color:#EFEFEF;border: 1px solid #808080;}</style>";function rpx(a,b){return new RegExp(a, b||'i')};function strtolower(a){return new String(a).toLowerCase();};function userLog(a){holodeck.activeDialogue().displayUnsanitizedMessage("<b style='color:purple'>Info</b>",a,{"class":"InfoMessage"},{non_user:true})};function userList(){return (_userList.replace(/[^a-z0-9_,]/ig,'')+",").toLowerCase()};function Ucallback(data){var type = data.type;switch(true){case type==KonduitEvent.DISCONNECT:userLog("Disconnected.");break;case type==KonduitEvent.CONNECT:userLog("Connected.");break;case type==KonduitEvent.USER_JOIN:if(userList().match(rpx(","+strtolower(data.data.user.username)+","))){userLog(data.data.user.username+" joined the room.");}break;case type==KonduitEvent.USER_DEPARTURE:if(userList().match(rpx(","+strtolower(data.data.user.username)+","))){userLog(data.data.user.username+" left the room.");}break}};function _display(a){holodeck.activeDialogue().displayUnsanitizedMessage("<b style='color:purple'>Info</b>",a,{"class":"InfoMessage"},{non_user:true})};function _lst(w,x){if(w[0]){w=w.join(", ");var a;if((a=w.lastIndexOf(","))+1){w=w.split("");w=w.each(function(q,b){if(b==a)w[b]=x?" and":" or"}).join("")}return w}else{return "no one"}};var sky_listen_regex=/^\/(?:un?)?listen\s*([a-z0-9_]{4,16})\s*(?:,\s*([a-z0-9_]{3,16})\s*(?:,\s*([a-z0-9_]{3,16})\s*(?:,\s*([a-z0-9_]{3,16})\s*(?:,\s*([a-z0-9_]{3,16})\s*)?)?)?)?/i; holodeck.addChatCommand("listen", function(b,d){var a=d.match(sky_listen_regex),w=[],list=_userList.split(",");if(a&&a[1]){var i=1;while(a[i]){list.push(strtolower(a[i]));w.push(strtolower(a[i]));i++};_userList=list.sort().each(function(a,b){if(list[b]==list[b+1]){list.splice(b,1)}}).join(",");_display("Listening for "+_lst(w,1)+".")}return false});holodeck.addChatCommand("unlisten", function(b,d){var a=d.match(sky_listen_regex),w=[],list=_userList;if(a&&a[1]){var i=1;while(a[i]){list.replace(rpx(","+strtolower(a[i]),"ig"),',');w.push(strtolower(a[i]));i++};_userList=list;_display("No longer listening for "+_lst(w)+".")}return false});holodeck.addChatCommand("ulisten", function(b,d){var a=d.match(sky_listen_regex),w=[],list=_userList;if(a&&a[1]){var i=1;while(a[i]){list.replace(rpx(","+strtolower(a[i]),"ig"),',');w.push(strtolower(a[i]));i++};_userList=list;_display("No longer listening for "+_lst(w)+".")}return false});holodeck.addChatCommand("list", function(b,d){var a=d.match(/^\/list\s*([0-9a-z][0-9a-z_]{0,15})/),x,list=_userList.split(",");list.shift();if(a&&a[1]){x=list.length; while(x-->0){if(!list[x].match(a[1])){list.splice(x,1)}}}_display("Listening to "+_lst(list,1)+".");return false});holodeck._event_dispatcher.register(KonduitEvent.USER_JOIN, function(){Ucallback.apply(window, arguments)});holodeck._event_dispatcher.register(KonduitEvent.USER_DEPARTURE, function(){Ucallback.apply(window, arguments)});void(0)
// Remove an entire page of friends -- must be on _your_ friends list
javascript:var Q=0,i=$$('.remove a');i.each(function(a){a.onclick = function(){var i = document.createElement('iframe'), f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'POST', f.target = i.name = i.id = "FRAME_"+(++Q), f.action = this.href;this.parentNode.appendChild(i);var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', '_method'); m.setAttribute('value', 'delete'); f.appendChild(m);var s = document.createElement('input'); s.setAttribute('type', 'hidden'); s.setAttribute('name', 'authenticity_token'); s.setAttribute('value', ''); f.appendChild(s);f.submit(); return false;}; a.onclick()});void(0)
/*
TODO:
/add friend(s)
/remove
/unadd
/mute
/unmute
mute room;
expand on user sorter to differentiate
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.