Free javascript Hosting


more-smilies.user.js

Uploaded on Oct 28 2009 11:09 by bliss_berry89

// Based on the original emoticonsforblogger by Kuribo (http://www.kuribo.info/2006/04/emoticons-for-blogger.html)
// Modified by rohman (http://rohman-freeblogtemplate.blogspot.com/)

// 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
// ==UserScript==
// @name more-smilies
// @namespace http://kangrohman.googlepages.com/
// @description You can use emoticons in Blogger.
// @include http://*.blogger.com/post-edit.g?*
// @include http://*.blogger.com/post-create.g?*
// ==/UserScript==

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


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

var buttons = "<br />";
buttons += emoticonButton(":ayuk:", "http://img148.imageshack.us/img148/1410/ayukzw6.gif");
buttons += emoticonButton(":bye:", "http://img148.imageshack.us/img148/2531/byest8.gif");
buttons += emoticonButton(":damn:", "http://img148.imageshack.us/img148/4531/damnfd2.gif");
buttons += emoticonButton(":gatau:", "http://img148.imageshack.us/img148/5097/gatauob4.gif");
buttons += emoticonButton(":konslet:", "http://img148.imageshack.us/img148/5963/konsleths8.gif");
buttons += emoticonButton(":love:", "http://img148.imageshack.us/img148/1233/lovefo9.gif");
buttons += emoticonButton(":males:", "http://img148.imageshack.us/img148/4708/malesiw5.gif");
buttons += emoticonButton(":music:", "http://img148.imageshack.us/img148/5263/musikpi4.gif");
buttons += emoticonButton(":nangis:", "http://img148.imageshack.us/img148/7223/nangisru6.gif");
buttons += emoticonButton(":ngacir:", "http://img148.imageshack.us/img148/3656/ngacirzy5.gif");
buttons += emoticonButton(":ngiler:", "http://img148.imageshack.us/img148/1884/ngileroq4.gif");
buttons += emoticonButton(":nocomment:", "http://img148.imageshack.us/img148/6620/nocommentyu9.gif");
buttons += emoticonButton(":nyerah:", "http://img148.imageshack.us/img148/7484/nyerahhh8.gif");
buttons += emoticonButton(":nggaya:", "http://img148.imageshack.us/img148/639/nggayakv2.gif");
buttons += emoticonButton(":senam:", "http://img148.imageshack.us/img148/2184/senamva0.gif");
buttons += emoticonButton(":sinchan", "http://img148.imageshack.us/img148/5968/sinchanwp3.gif");
buttons += emoticonButton(":sombong:", "http://img148.imageshack.us/img148/2853/sombongeu9.gif");
buttons += emoticonButton(":puppyeyes:", "http://img148.imageshack.us/img148/9715/sorrycl0.gif");
buttons += emoticonButton(":tendang:", "http://img148.imageshack.us/img148/6643/tendangfx3.gif");
buttons += emoticonButton("::", "http://img148.imageshack.us/img148/4416/tipiav1.gif");


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+"\\\" width=\\\"50\\\" height=\\\"50\\\" alt=\\\"" + name + "\\\" title=\\\"" + name + "\\\" />\";})();ButtonMouseDown(this);'><img width=\"25\" height=\"25\" 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