Free javascript Hosting


katak.user.js

Uploaded on Jan 06 2010 02:19 by cikamoi

//-----------------------------------------------------------------------//
// AMOI'S STORY
// CIK AMOI
// Visit my blog at http://rojakstory.blogspot.com/
//-----------------------------------------------------------------------//

//Credits to original author : Along Arman ( http://hanatrg.blogspot.com )
// ==UserScript==
// @name Cik Amoi ( katak )
// ==/UserScript==

// FEATURES
// Works only in Compose modes
// Add the emoticons at the end of the text

// TODO
// modify the script to insert the emoticon directly after the cursor

window.addEventListener("load", function(e) {

function setemoticons(domname)
{
var editbar = document.getElementById(domname);
if (editbar) {

var buttons = "<br />";
buttons += emoticonButton(":01:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/baca.png");

buttons += emoticonButton(":02:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/broken.png");

buttons += emoticonButton(":03:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/capede.png");

buttons += emoticonButton(":04:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/capek.png");

buttons += emoticonButton(":05:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/centil.png");

buttons += emoticonButton(":06:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/cinta.png");

buttons += emoticonButton(":07:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/cuih.png");

buttons += emoticonButton(":08:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/diam.png");

buttons += emoticonButton(":09:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/hurt.png");

buttons += emoticonButton(":10:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/kacamata.png");

buttons += emoticonButton(":11:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/kaget.png");

buttons += emoticonButton(":12:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/ketawa.png");

buttons += emoticonButton(":13:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/maem.png");

buttons += emoticonButton(":14:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/marah.png");

buttons += emoticonButton(":15:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/matre.png");

buttons += emoticonButton(":16:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/mewek.png");

buttons += emoticonButton(":17:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/nangis.png");

buttons += emoticonButton(":18:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/ndepipis-1.png");

buttons += emoticonButton(":19:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/ndepipis.png");

buttons += emoticonButton(":20:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/ngamuk.png");

buttons += emoticonButton(":21:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/ngantuk.png");

buttons += emoticonButton(":22:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/ngupil.png");

buttons += emoticonButton(":23:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/piss.png");

buttons += emoticonButton(":24:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/senyum.png");

buttons += emoticonButton(":25:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/sip.png");

buttons += emoticonButton(":26:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/siul.png");

buttons += emoticonButton(":27:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/sstt.png");

buttons += emoticonButton(":28:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/tanya.png");

buttons += emoticonButton(":29:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/telpon.png");

buttons += emoticonButton(":30:", "http://i359.photobucket.com/albums/oo33/cikamoi/katak/ting.png");


buttons += separator();

editbar.innerHTML += buttons;
}
}


function emoticonButton(name, url) {
return "<span class='' style='display: block;' id='htmlbar_undefined' title='" + name + "' onmouseover='ButtonHoverOn(this);' onmouseout='ButtonHoverOff(this);' onmouseup='' onmousedown='CheckFormatting(event);(function() {var rich_edit = document.getElementById(\"richeditorframe\");var rich_body = rich_edit.contentDocument.getElementsByTagName(\"body\");rich_body[0].innerHTML+=\"<img class=\\\"emoticon\\\" src=\\\""+url+"\\\" alt=\\\"" + name + "\\\" title=\\\"" + name + "\\\" />\";})();ButtonMouseDown(this);'><img src='" + url + "' alt='" + name + "' border='0'></span>\n";
}

function separator() {
return "<div style=\"display: block;\" class=\"vertbar\"><span style=\"display: block;\" class=\"g\">&nbsp;</span><span style=\"display: block;\" class=\"w\">&nbsp;</span></div>\n";
}

setemoticons("formatbar");

}, false);

Back to list