i’m running the code.js from background.js.
background.js contains
chrome.browserAction.onClicked.addListener(function(tab) {
chrome.tabs.executeScript(tab.id, {file: "code.js"})
});
code.js contains
(function(d){var f=d.createElement('form');f.action='http://example.com/run.html?bm';f.method='post';var i=d.createElement('input');i.type='hidden';i.name='url';i.value=document.location.href;f.appendChild(i);d.body.appendChild(f);f.submit();})(window.open().document)
But instead of transferring of current URL with POST to http://example.com/run.html?bm and load related page, as i get it in Chrome - i get only an empty tab (about:blank).
How can i run this POST in FF?