Hi im creating an extension to chrome and i have a little problem. Im want to add button that sends text to textarea.
var c = document.createElement(‘c’);
c.type = ‘button’;
c.className = ‘button button–icon-only float-left’;
c.title = ‘Text’;
c.innerHTML = ‘<img src=’/uploads/default/original/2X/2/25c0a2f26e88a76ae81165f8919512ff0ad4fae6.png’;>’;
setInterval(function()
{
var container = document.querySelector('.chat-buttons-container');
container.appendChild(c);
}, 1000);
c.onlick = taFunkcja();
function taFunkcja(){
var t = document.createTextNode("Example Text");
c.appendChild(t);
document.getElementById("ember2386").appendChild(c);
};
I have my button on chat (scr: http://scr.hu/0jvt/9hqz8) but they don’t send text.
Thank you.