This commit is contained in:
Jonathan Wyss 2024-03-17 18:57:18 +01:00
parent acd94cb7ab
commit 0cc3893be9
2 changed files with 5 additions and 2 deletions

View File

@ -40,6 +40,10 @@ async function nextUrl(data,tab,i)
let count_urls = data.subscriptions.length;
for(i=0;i<count_urls;){
await sendMessageToContent(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});
console.log("iterating");
console.log(i);
i++;

View File

@ -2,8 +2,8 @@
//1.grant host permission
//
//
browser.runtime.onMessage.addListener(worker);
browser.runtime.onMessage.addListener(worker);
// return Promise.resolve(true);
/*.then(function(){
window.location.replace(url);
@ -19,5 +19,4 @@ function worker(message,sender,sendResponse)
let url = message.url;
console.log(url);
sendResponse(true);
window.location.replace(url);
}