mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2024-11-10 02:27:29 +00:00
Strip slashes when loading instances
This commit is contained in:
parent
c6363424cb
commit
7c31d04055
@ -4,7 +4,7 @@ let globalList = []
|
|||||||
|
|
||||||
function execute() {
|
function execute() {
|
||||||
return request("https://api.invidious.io/instances.json?sort_by=health").then(res => res.json()).then(list => {
|
return request("https://api.invidious.io/instances.json?sort_by=health").then(res => res.json()).then(list => {
|
||||||
list = list.filter(i => i[1].type === "https").map(i => i[1].uri)
|
list = list.filter(i => i[1].type === "https").map(i => i[1].uri.replace(/\/+$/, ""))
|
||||||
globalList = list
|
globalList = list
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
|
Loading…
Reference in New Issue
Block a user