if(text.substr(0,7)=="/pricka" && prickarer[nick]) { if(document.getElementsByClassName('prick')[0]) return; var d = document.createElement('div'); d.className='prick'; document.body.appendChild(d); }