mirror of
https://github.com/ReviveMii/revivetube
synced 2025-04-29 12:39:25 -04:00
loading fix
This commit is contained in:
parent
c0693ec17e
commit
60f083d6c2
1 changed files with 15 additions and 14 deletions
|
@ -102,6 +102,7 @@
|
|||
setInterval(checkStatus, 1000);
|
||||
}
|
||||
|
||||
|
||||
function checkStatus() {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', '/status/' + videoId, true);
|
||||
|
@ -109,7 +110,7 @@
|
|||
if (xhr.readyState === 4 && xhr.status === 200) {
|
||||
var response;
|
||||
try {
|
||||
response = JSON.parse(xhr.responseText);
|
||||
response = eval('(' + xhr.responseText + ')');
|
||||
} catch (e) {
|
||||
response = { status: 'error' };
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue