Page MenuHomeIn-Portal Phabricator

smiley.js
No OneTemporary

File Metadata

Created
Wed, Jun 25, 1:34 PM

smiley.js

function AddToText(str)
{
d= document.getElementById('textbody');
d.value = d.value + str;
d.focus();
return;
}
function AddTagWithText(tag)
{
str = '['+tag+ ']';
inText = window.prompt('Enter text to appear inside the tag:','');
if(inText!=null)
{
str = str + inText+'[/'+tag+']';
AddToText(str);
}
}
function AddURL()
{
str = '[URL';
href = window.prompt('Enter address to link to:','http://');
if(href!=null)
{
str = str+ ' href=\"'+href+'\"]';
name = window.prompt('Text to display for link:',href);
if(name!=null)
{
str = str+name+'[/URL]';
AddToText(str);
}
}
}
function AddList()
{
str = '[UL]\n [*]\n[/UL]';
AddToText(str);
}

Event Timeline