My Technorati Tag Generator
Every blogger needs Technorati tags to generate traffic. I am doubtful of the claim. However, since it is incredibly annoying that you have to type so much to put those darn technorati tags in your blog and it is so incredibly easy to write a simple web program to automate the task, so I decide to write one myself.
(Sure there are quite a few online, however, they always shamelessly carry their brand or ask you download and install something.)
Anyway, this is my javascript code
<script language="javascript">
<!--
//Generate Tags and copy to clipboard
function GetTags()
{
var tags=document.TagGenerator.tagtext.value.split(",");
var html="";
for (var i=0; i < tags.length-1; i++)
{
//trim leading and trailing spaces
tags[i]=tags[i].replace(/^\s+|\s+$/g, '');
html +='<a href="http://www.technorati.com/tag/' + tags[i]+ '" rel="tag">'+tags[i]+'</a>'+" ,";
}
//trim leading and trailing spaces
tags[i]=tags[i].replace(/^\s+|\s+$/g, '');
html +='<a href="http://www.technorati.com/tag/' + tags[i]+ '" rel="tag">'+tags[i]+'</a>';
document.TagGenerator.taghtml.value =html;
// Copied = document.TagGenerator.taghtml.createTextRange();
// Copied.execCommand("Copy");
}
//Select everything in the textarea
function SelectAll()
{
TagGenerator.taghtml.focus();
TagGenerator.taghtml.select();
}
//Generate Tags and copy to clipboard
function EnterToGetTags()
{
if (window.event && window.event.keyCode == 13)
GetTags();
}
function Focus()
{
document.TagGenerator.tagtext.focus();
}
//-->
</script>
And the working web page is @
Technorati Tag Generator