I cannot figure out how to add a button, in mozilla extension.
function checkForValidUrl(tabId, changeInfo, tab) {
if(changeInfo.status == 'complete') {
var btn = document.createElement("BUTTON")
var t = document.createTextNode("CLICK ME");
btn.appendChild(t);
//Appending to DOM
document.body.appendChild(btn);
document.body.insertBefore(button, document.body.firstChild);
alert("sucess");
}
chrome.tabs.onUpdated.addListener(checkForValidUrl);
i don't know what to do with .xul file