JSFiddle - React, Tailwind, and code Playground
HTML
<SCRIPT>
function addNick(numLink, nick){
in1=document.getElementsByName("mess")[0];
in1.value=nick+", "+in1.value;
document.links[numLink].href=document.links[numLink].oldhref;
pos=in1.value.length;
in1.focus();
in1.setSelectionRange(pos, pos);
};
function keyPressHandler(event){
if (event.keyCode==13){
document.getElementsByTagName("form")[0].submit();
return false;
};
};
function start(){
in1=document.getElementsByName("mess")[0];
ta=document.createElement("textarea");
ta.name="mess";
ta.cols=50;
ta.rows=3;
ta.onkeypress=keyPressHandler;
in1.parentNode.replaceChild(ta, in1);
re=/&mod=infa&userlogin=(.*?)$/;
for (i=0; i<document.links.length; i++){
match=re.exec(document.links[i].href);
if (match!=null){
document.links[i].oldhref=document.links[i].href;
document.links[i].href="javascript:addNick("+i+", \""+match[1]+"\");";
};
};
};
body=document.getElementsByTagName("body")[0];
body.onload=start;
window.setTimeout(function(){
in1=document.getElementsByName("mess")[0];
if (in1.tagName!="TEXTAREA") start();
}, 1000);
</SCRIPT>
CSS
^http://www.labwar.ru/chat.php?