By
gg88
—
Uploaded
Jun 16, 2009
// Based on the original emoticonsforblogger by Kuribo (http://www.kuribo.info/2006/04/emoticons-for-blogger.html)
// Modified by rinku726 (http://rinku726.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 Kao-anis Angel for Blogger
// @namespace http://itsmejijie.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(":)", "http://picto0.jugem.jp/m/a/c/machibana/994ee0fa684782accf472234efd5fac4.gif");
buttons += emoticonButton(":(", "http://picto0.jugem.jp/c/h/o/choco-milk/d1f98e3ecc90a52b10979216d9d07505.gif");
buttons += emoticonButton("Yay", "http://kaoani.ikilote.net/Les_Anges_(4)/003.gif");
buttons += emoticonButton("Lub", "http://kaoani.ikilote.net/Les_Anges_(4)/004.gif");
buttons += emoticonButton("Hehe", "http://kaoani.ikilote.net/Les_Anges_(4)/005.gif");
buttons += emoticonButton("Glide", "http://kaoani.ikilote.net/Les_Anges_(4)/006.gif");
buttons += emoticonButton("Smirk", "http://kaoani.ikilote.net/Les_Anges_(4)/007.gif");
buttons += emoticonButton("o.o", "http://kaoani.ikilote.net/Les_Anges_(4)/008.gif");
buttons += emoticonButton("Sparkle", "http://kaoani.ikilote.net/Les_Anges_(4)/009.gif");
buttons += emoticonButton("Peace", "http://kaoani.ikilote.net/Les_Anges_(4)/011.gif");
buttons += emoticonButton("Rub", "http://kaoani.ikilote.net/Les_Anges_(4)/013.gif");
buttons += emoticonButton("Dizzy", "http://kaoani.ikilote.net/Les_Anges_(4)/014.gif");
buttons += emoticonButton("Question", "http://kaoani.ikilote.net/Les_Anges_(4)/015.gif");
buttons += emoticonButton("Write", "http://kaoani.ikilote.net/Les_Anges_(4)/016.gif");
buttons += emoticonButton("LMAO", "http://kaoani.ikilote.net/Les_Anges_(4)/018.gif");
buttons += emoticonButton("Cheer", "http://kaoani.ikilote.net/Les_Anges_(4)/019.gif");
buttons += emoticonButton("Smoke", "http://kaoani.ikilote.net/Les_Anges_(4)/020.gif");
buttons += emoticonButton("Yawn", "http://kaoani.ikilote.net/Les_Anges_(4)/021.gif");
buttons += emoticonButton("Clap", "http://kaoani.ikilote.net/Les_Anges_(4)/023.gif");
buttons += emoticonButton("News", "http://kaoani.ikilote.net/Les_Anges_(4)/031.gif");
buttons += emoticonButton("Wave", "http://kaoani.ikilote.net/Les_Anges_(4)/032.gif");
buttons += emoticonButton("Grad", "http://kaoani.ikilote.net/Les_Anges_(4)/033.gif");
buttons += emoticonButton("Xmas", "http://kaoani.ikilote.net/Les_Anges_(4)/035.gif");
buttons += emoticonButton("HDance", "http://kaoani.ikilote.net/Les_Anges_(4)/038.gif");
buttons += emoticonButton("Sweat", "http://kaoani.ikilote.net/Les_Anges_(4)/040.gif");
buttons += emoticonButton("XI", "http://kaoani.ikilote.net/Les_Anges_(4)/040.gif");
buttons += emoticonButton("T_T", "http://kaoani.ikilote.net/Les_Anges_(4)/042.gif");
buttons += emoticonButton("Heh", "http://kaoani.ikilote.net/Les_Anges_(9)/001.gif");
buttons += emoticonButton(":P", "http://kaoani.ikilote.net/Les_Anges_(9)/003.gif");
buttons += emoticonButton("Bwahaha", "http://kaoani.ikilote.net/Les_Anges_(9)/004.gif");
buttons += emoticonButton("x_x", "http://kaoani.ikilote.net/Les_Anges_(9)/005.gif");
buttons += emoticonButton("Blergh", "http://kaoani.ikilote.net/Les_Anges_(9)/006.gif");
buttons += emoticonButton(";)", "http://kaoani.ikilote.net/Les_Anges_(9)/007.gif");
buttons += emoticonButton(">_<", "http://kaoani.ikilote.net/Les_Anges_(9)/009.gif");
buttons += emoticonButton("o__o", "http://kaoani.ikilote.net/Les_Anges_(9)/012.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\"> </span><span style=\"display: block;\" class=\"w\"> </span></div>\n";
}
setemoticons("formatbar");
}, false);