Free javascript Hosting


kitty emoticon.js

Uploaded on Sep 25 2009 00:25 by nosameerf

// Based on the original emoticonsforblogger by Kuribo (http://www.kuribo.info/2006/04/emoticons-for-blogger.html)
// Modified by Wolverinex02 (http://wolverinex02.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 Kitty Emoticons for Blogger
// @namespace http://wolverinex02.blogspot.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("kaos-hellokitty01", "http://www.anikaos.com/0011-hellokitty/kaos-hellokitty01.gif");
buttons += emoticonButton("kaos-hellokitty02", "http://www.anikaos.com/0011-hellokitty/kaos-hellokitty02.gif");
buttons += emoticonButton("kaos-hellokitty03", "http://www.anikaos.com/0011-hellokitty/kaos-hellokitty03.gif");
buttons += emoticonButton("kaos-hellokitty04", "http://www.anikaos.com/0011-hellokitty/kaos-hellokitty04.gif");
buttons += emoticonButton("kaos-hellokitty05", "http://www.anikaos.com/0011-hellokitty/kaos-hellokitty05.gif");
buttons += emoticonButton("kaos-hellokitty06", "http://www.anikaos.com/0011-hellokitty/kaos-hellokitty06.gif");
buttons += emoticonButton("kaos-hellokitty07", "http://www.anikaos.com/0011-hellokitty/kaos-hellokitty07.gif");
buttons += emoticonButton("kaos-hellokitty08", "http://www.anikaos.com/0011-hellokitty/kaos-hellokitty08.gif");
buttons += emoticonButton("kaos-hellokitty09", "http://www.anikaos.com/0011-hellokitty/kaos-hellokitty09.gif");
buttons += emoticonButton("kaos-hellokitty10", "http://www.anikaos.com/0011-hellokitty/kaos-hellokitty10.gif");
buttons += emoticonButton("kaos-hellokitty11", "http://www.anikaos.com/0011-hellokitty/kaos-hellokitty11.gif");
buttons += emoticonButton("kaos-hellokitty12", "http://www.anikaos.com/0011-hellokitty/kaos-hellokitty12.gif");
buttons += emoticonButton("kaos-hellokitty13", "http://www.anikaos.com/0011-hellokitty/kaos-hellokitty13.gif");
buttons += emoticonButton("kaos-hellokitty14", "http://www.anikaos.com/0011-hellokitty/kaos-hellokitty14.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+"\\\" 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