Free javascript Hosting


naruto emoticon.js

Uploaded on Sep 25 2009 00:20 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 Naruto Emoticons for Blogger
// @namespace http://wolverinex02.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("brosse", "http://www.anikaos.com/0002-anime/naruto_smilies/naruto_brosse.gif");
buttons += emoticonButton("choc", "http://www.anikaos.com/0002-anime/naruto_smilies/naruto_choc.gif");
buttons += emoticonButton("doigt", "http://www.anikaos.com/0002-anime/naruto_smilies/naruto_doigt.gif");
buttons += emoticonButton("happy", "http://www.anikaos.com/0002-anime/naruto_smilies/naruto_happy.gif");
buttons += emoticonButton("kiss", "http://www.anikaos.com/0002-anime/naruto_smilies/naruto_kiss.gif");
buttons += emoticonButton("langue", "http://www.anikaos.com/0002-anime/naruto_smilies/naruto_langue.gif");
buttons += emoticonButton("lol", "http://www.anikaos.com/0002-anime/naruto_smilies/naruto_lol.gif");
buttons += emoticonButton("nohappy", "http://www.anikaos.com/0002-anime/naruto_smilies/naruto_nothappy.gif");
buttons += emoticonButton("ok", "http://www.anikaos.com/0002-anime/naruto_smilies/naruto_ok.gif");
buttons += emoticonButton("victoire", "http://www.anikaos.com/0002-anime/naruto_smilies/naruto_victoire.gif");
buttons += emoticonButton("venere", "http://www.anikaos.com/0002-anime/naruto_smilies/naruto_venere.gif");
buttons += emoticonButton("smile", "http://www.anikaos.com/0002-anime/naruto_smilies/naruto_smile.gif");
buttons += emoticonButton("clapclap", "http://www.anikaos.com/0002-anime/naruto_smilies/naruto_clapclap.gif");
buttons += emoticonButton("cool", "http://www.anikaos.com/0002-anime/naruto_smilies/naruto_cool.gif");
buttons += emoticonButton("cry", "http://www.anikaos.com/0002-anime/naruto_smilies/naruto_cry.gif");
buttons += emoticonButton("naruto", "http://www.anikaos.com/0002-anime/naruto_smilies/naruto.gif");
buttons += emoticonButton("zzz", "http://www.anikaos.com/0002-anime/naruto_smilies/naruto_zzz.gif");
buttons += emoticonButton("pfff", "http://www.anikaos.com/0002-anime/naruto_smilies/naruto_pff.gif");
buttons += emoticonButton("question", "http://www.anikaos.com/0002-anime/naruto_smilies/naruto_question.gif");
buttons += emoticonButton("yondaime", "http://www.anikaos.com/0002-anime/naruto_characters/yondaime.gif");
buttons += emoticonButton("kakashifull", "http://www.anikaos.com/0020-anime_animated/naruto_kakashifull.gif");
buttons += emoticonButton("kakashi", "http://www.anikaos.com/0020-anime_animated/naruto_kakashi.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