Please help! I need that when I clicks on plugin that he fill a form, can somebody help me?

e.g. When I come on www.facebook.com and clicks on plugin he must automaticly fill a form username and a password.

Heare is my try but without success, and I can't find any examples on the internet.

extension. chrome.windows.getCurrent(function(tab) {
document.getElementById("#email").value = "someData";
});