From 834ca65a7dfaa3e43d6cc4e587103a54dae6ee1a Mon Sep 17 00:00:00 2001 From: FireMasterk <20838718+FireMasterK@users.noreply.github.com> Date: Mon, 6 Jul 2020 02:20:58 +0530 Subject: [PATCH] Remove cors-anywhere --- manifest.json | 1 + scripts/tabOnUpdated.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 7590056..4d90b94 100644 --- a/manifest.json +++ b/manifest.json @@ -4,6 +4,7 @@ "permissions": [ "https://www.youtube.com/watch?v=*", "https://www.youtube.com/channel/*", + "https://api.lbry.com/*", "tabs", "storage" ], diff --git a/scripts/tabOnUpdated.js b/scripts/tabOnUpdated.js index 75f6242..50b3630 100644 --- a/scripts/tabOnUpdated.js +++ b/scripts/tabOnUpdated.js @@ -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);