sdf
This commit is contained in:
parent
68514f7f68
commit
96be5a4418
@ -8,7 +8,9 @@ readUrl();
|
||||
function Setup(data)
|
||||
{
|
||||
let i=0;
|
||||
browser.browserAction.onClicked.addListener(create);
|
||||
browser.browserAction.onClicked.addListener(function(event){
|
||||
create(data);
|
||||
});
|
||||
|
||||
}
|
||||
var create = (function(data){
|
||||
@ -17,11 +19,16 @@ var create = (function(data){
|
||||
browser.runtime.onMessage.addListener((message)=>{
|
||||
if(message === "Button_clicked")
|
||||
{
|
||||
nextUrl(data,tab,i);
|
||||
|
||||
console.log("pass tab data to run, in promise");
|
||||
console.log(tab);
|
||||
|
||||
}
|
||||
else if(message === "Content_Loaded")
|
||||
{
|
||||
console.log("Received Content_Loaded");
|
||||
nextUrl(data,tab,i);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -38,6 +45,7 @@ async function nextUrl(data,tab,i)
|
||||
code1 = `window.location.replace("${data.subscriptions[i].url}");`
|
||||
console.log(code1);
|
||||
await browser.tabs.update(tab.tabid,{url : data.subscriptions[i].url});
|
||||
await waitforTab(tab,data.subscriptions[i].url);
|
||||
console.log(tab);
|
||||
console.log("iterating");
|
||||
console.log(i);
|
||||
|
Loading…
Reference in New Issue
Block a user