mirror of
https://github.com/LBRYFoundation/Watch-on-LBRY.git
synced 2025-08-23 17:47:26 +00:00
Merge pull request #18 from StuffNoOneCaresAbout/master
Remove cors-anywhere
This commit is contained in:
commit
2f91e320a5
2 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"https://www.youtube.com/watch?v=*",
|
"https://www.youtube.com/watch?v=*",
|
||||||
"https://www.youtube.com/channel/*",
|
"https://www.youtube.com/channel/*",
|
||||||
|
"https://api.lbry.com/*",
|
||||||
"tabs",
|
"tabs",
|
||||||
"storage"
|
"storage"
|
||||||
],
|
],
|
||||||
|
|
|
@ -5,7 +5,7 @@ chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
|
||||||
const { id, type } = getId(tab.url);
|
const { id, type } = getId(tab.url);
|
||||||
if (!id) return;
|
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 response = await fetch(url, { headers: { 'Content-Type': 'application/json' } });
|
||||||
const json = await response.json();
|
const json = await response.json();
|
||||||
console.log(json);
|
console.log(json);
|
||||||
|
|
Loading…
Add table
Reference in a new issue