mirror of
https://github.com/ReviveMii/revivetube
synced 2025-09-06 05:20:59 +02:00
loading fix
This commit is contained in:
parent
c0693ec17e
commit
60f083d6c2
@ -102,6 +102,7 @@
|
|||||||
setInterval(checkStatus, 1000);
|
setInterval(checkStatus, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function checkStatus() {
|
function checkStatus() {
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open('GET', '/status/' + videoId, true);
|
xhr.open('GET', '/status/' + videoId, true);
|
||||||
@ -109,7 +110,7 @@
|
|||||||
if (xhr.readyState === 4 && xhr.status === 200) {
|
if (xhr.readyState === 4 && xhr.status === 200) {
|
||||||
var response;
|
var response;
|
||||||
try {
|
try {
|
||||||
response = JSON.parse(xhr.responseText);
|
response = eval('(' + xhr.responseText + ')');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
response = { status: 'error' };
|
response = { status: 'error' };
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user