sdf
This commit is contained in:
parent
a8989ee13a
commit
1e0e313113
@ -14,7 +14,7 @@ data = readUrl()
|
||||
});
|
||||
|
||||
function handleMessages(message,sender,sendResponse,tab,data){
|
||||
if(message.state === "Button_clicked")
|
||||
if(message === "Button_clicked")
|
||||
{
|
||||
browser.tabs.executeScript(tab.id,{
|
||||
file:"spawn.js"
|
||||
@ -49,6 +49,18 @@ function handleMessages(message,sender,sendResponse,tab,data){
|
||||
}
|
||||
}
|
||||
|
||||
function readFile()
|
||||
{
|
||||
const fileField = document.querySelector('input[type="file"]');
|
||||
fileField.addEventListener("change",() =>
|
||||
{
|
||||
console.log(fileField.files[0]);
|
||||
});
|
||||
var reader = new FileReader();
|
||||
|
||||
|
||||
|
||||
|
||||
function readUrl()
|
||||
{
|
||||
let data;
|
||||
|
3
home.js
3
home.js
@ -13,7 +13,6 @@ document.getElementById("id_run").addEventListener("click", function(e){
|
||||
|
||||
function startBackgroundScript()
|
||||
{
|
||||
browser.runtime.sendMessage({state : "Button_clicked",
|
||||
fileHandler:fileField);
|
||||
browser.runtime.sendMessage("Button_clicked");
|
||||
console.log("home.js sent button_clicked message...");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user