InstaSynch emote list

Shows a list of available emotes.

ของเมื่อวันที่ 06-10-2014 ดู เวอร์ชันล่าสุด

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        InstaSynch emote list
// @description Shows a list of available emotes.
// @namespace   oh no oh god oh man og nafaasdasd
// @include     http://instasynch.com/rooms/*
// @version     1.2
// @run_at      document_end
// @grant       none
// ==/UserScript==

// post a message
function sendMessage(message){
    $('#cin').val(message);
    $('#cin').trigger({ type : 'keypress', which : 13 });
}
sndmsg_pre = "$(\"#cin\").val(\""
sndmsg_post = "\");$(\"#cin\").trigger({ type : \"keypress\", which : 13 });"

$("\
<button id='emotes' onclick='javascript: $(\"#create-poll.emotes\").toggle();'>Emotes</button>").insertAfter("#create-pollBtn")

function toDo(){
  emote_container=$("\
<div id='create-poll' class='emotes' style='display:block;overflow:auto;vertical-align:middle; height: 200px;'></div>").insertAfter("#create-poll")
  for(code in $codes){
    emote_container.append("<tr onclick='javascript:"+sndmsg_pre+"/"+code+sndmsg_post+"'><td style='padding:5px 0px 5px 5px;'>"+code+":</td><td style='padding:5px 5px 5px 0px;'>"+$codes[code]+"</td></tr>")
  }
  emote_container.toggle();
}


// gotta delay the script to allow other scripts to settle down
setTimeout(toDo,3000);