This commit is contained in:
2024-03-14 22:11:08 +01:00
commit 67bd4e2c28
7 changed files with 89 additions and 0 deletions

29
yt.js Normal file
View File

@@ -0,0 +1,29 @@
document.body.style.border = "5px solid red";
const filePath = "newpipe_subscriptions_202403101004.json";
var localURL = browser.extension.getURL(filePath);
var w=[];
fetch(localURL)
.then((res) => {
if(!res.ok){
throw new Error
(`res error`);
}
return res.json();
})
.then((data) => {
for(let i=0;i<3;i++) //i in data.subscriptions)
{
let open=null;
console.log(data.subscriptions[i].url);
try{
open = alert(data.subscriptions[i].url,"_blank");
}
catch(e) {InsertError(e.description);}
}
})
.catch((error)=> console.error("couldnt fetch data",error));