Main Page
// Based on the original emoticonsforblogger by Kuribo (http://www.kuribo.info/2006/04/emoticons-for-blogger.html) // Modified by Wolverinex02 (http://wolverinex02.blogspot.com/) and Wuma http://wuma-wuma.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 Emoticons for Blogger // @namespace http://www.kuribo.info/ // @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 = "
";
buttons += emoticonButton("kawaiicloud", "http://martina.zancan.googlepages.com/kawaiicloud.gif"); buttons += emoticonButton("razzcloud", "http://martina.zancan.googlepages.com/razzcloud.gif"); buttons += emoticonButton("laughcloud", "http://martina.zancan.googlepages.com/laughcloud.gif"); buttons += emoticonButton("gaspcloud", "http://martina.zancan.googlepages.com/gaspcloud.gif"); buttons += emoticonButton("jawdrop", "http://martina.zancan.googlepages.com/jawdrop.gif"); buttons += emoticonButton("lolcloud", "http://martina.zancan.googlepages.com/lolcloud.gif");
buttons += emoticonButton("angry", "http://martina.zancan.googlepages.com/angry.gif"); buttons += emoticonButton("angrycloud", "http://martina.zancan.googlepages.com/angrycloud.gif"); buttons += emoticonButton("argh", "http://martina.zancan.googlepages.com/argh.gif"); buttons += emoticonButton("arghcloud", "http://martina.zancan.googlepages.com/arghcloud.gif"); buttons += emoticonButton("arghcookies", "http://martina.zancan.googlepages.com/arghcookies.gif"); buttons += emoticonButton("befuddled", "http://martina.zancan.googlepages.com/angry.gif"); buttons += emoticonButton("befuddledcloud", "http://martina.zancan.googlepages.com/befuddledcloud.gif"); buttons += emoticonButton("biggrin", "http://martina.zancan.googlepages.com/biggrin.gif"); buttons += emoticonButton("biggrincloud", "http://martina.zancan.googlepages.com/biggrincloud.gif"); buttons += emoticonButton("biggrincookies", "http://martina.zancan.googlepages.com/biggrincookies.gif"); buttons += emoticonButton("blushcloud", "http://martina.zancan.googlepages.com/blushcloud.gif"); buttons += emoticonButton("blushcookies", "http://martina.zancan.googlepages.com/blushcookies.gif"); buttons += emoticonButton("cry", "http://martina.zancan.googlepages.com/cry.gif"); buttons += emoticonButton("crycloud", "http://martina.zancan.googlepages.com/crycloud.gif"); buttons += emoticonButton("crycookies", "http://martina.zancan.googlepages.com/crycookies.gif"); buttons += emoticonButton("dead", "http://martina.zancan.googlepages.com/dead.gif"); buttons += emoticonButton("deadcloud", "http://martina.zancan.googlepages.com/deadcloud.gif"); buttons += emoticonButton("excited", "http://martina.zancan.googlepages.com/excited.gif"); buttons += emoticonButton("excitedcookies", "http://martina.zancan.googlepages.com/excitedcookies.gif"); buttons += emoticonButton("gasp", "http://martina.zancan.googlepages.com/gasp.gif"); buttons += emoticonButton("gaspcookies", "http://martina.zancan.googlepages.com/gaspcookies.gif"); buttons += emoticonButton("headache", "http://martina.zancan.googlepages.com/headache.gif"); buttons += emoticonButton("jawdropcookies", "http://martina.zancan.googlepages.com/jawdropcookies.gif"); buttons += emoticonButton("kawaii", "http://martina.zancan.googlepages.com/kawaii.gif"); buttons += emoticonButton("kawaiicookies", "http://martina.zancan.googlepages.com/kawaiicookies.gif"); buttons += emoticonButton("laughcookies", "http://martina.zancan.googlepages.com/laughcookies.gif"); buttons += emoticonButton("love", "http://martina.zancan.googlepages.com/love.gif"); buttons += emoticonButton("lovecloud", "http://martina.zancan.googlepages.com/lovecloud.gif"); buttons += emoticonButton("lovecookies", "http://martina.zancan.googlepages.com/lovecookies.gif"); buttons += emoticonButton("razz", "http://martina.zancan.googlepages.com/razz.gif"); buttons += emoticonButton("razzcookies", "http://martina.zancan.googlepages.com/razzcookies.gif"); buttons += emoticonButton("sadcookies", "http://martina.zancan.googlepages.com/sadcookies.gif"); buttons += emoticonButton("sighcloud", "http://martina.zancan.googlepages.com/sighcloud.gif"); buttons += emoticonButton("razzcookies", "http://martina.zancan.googlepages.com/razzcookies.gif"); buttons += emoticonButton("sighcookies", "http://martina.zancan.googlepages.com/sighcookies.gif"); buttons += emoticonButton("smile", "http://martina.zancan.googlepages.com/smile.gif"); buttons += emoticonButton("squeecloud", "http://martina.zancan.googlepages.com/squeecloud.gif"); buttons += emoticonButton("squeecookies", "http://martina.zancan.googlepages.com/squeecookies.gif"); buttons += emoticonButton("sweatdropcookies", "http://martina.zancan.googlepages.com/sweatdropcookies.gif"); buttons += emoticonButton("sweatdropsmile", "http://martina.zancan.googlepages.com/sweatdropsmile.gif"); buttons += emoticonButton("sweatdropsmilecloud", "http://martina.zancan.googlepages.com/sweatdropsmilecloud.gif"); buttons += emoticonButton("sweatdropsmilecookies", "http://martina.zancan.googlepages.com/sweatdropsmilecookies.gif"); buttons += emoticonButton("sweatdropworried", "http://martina.zancan.googlepages.com/sweatdropworried.gif"); buttons += emoticonButton("winkcloud", "http://martina.zancan.googlepages.com/winkcloud.gif"); buttons += emoticonButton("yeshcookies", "http://martina.zancan.googlepages.com/yeshcookies.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=\\\"15\\\" height=\\\"15\\\" alt=\\\"" + name + "\\\" title=\\\"" + name + "\\\" />\";})();ButtonMouseDown(this);'><img src='" + url + "' alt='" + name + "' border='0'>\n";
}
function separator() {
return "
\n";
}
setemoticons("formatbar");
}, false);