Remove cors-anywhere

This commit is contained in:
FireMasterk 2020-07-06 02:20:58 +05:30
parent 763060a9c0
commit 834ca65a7d
2 changed files with 2 additions and 1 deletions

View file

@ -4,6 +4,7 @@
"permissions": [
"https://www.youtube.com/watch?v=*",
"https://www.youtube.com/channel/*",
"https://api.lbry.com/*",
"tabs",
"storage"
],

View file

@ -5,7 +5,7 @@ chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
const { id, type } = getId(tab.url);
if (!id) return;
const url = `https://cors-anywhere.herokuapp.com/https://api.lbry.com/yt/resolve?${type}_ids=${id}`;
const url = `https://api.lbry.com/yt/resolve?${type}_ids=${id}`;
const response = await fetch(url, { headers: { 'Content-Type': 'application/json' } });
const json = await response.json();
console.log(json);