mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-07 10:33:38 +00:00
Fix reload of homepage after restart in some browsers
This commit is contained in:
parent
fa303ef962
commit
89ba88eb96
1 changed files with 9 additions and 2 deletions
|
@ -15,7 +15,10 @@ $.SickGear.numRestartWaits = 0;
|
||||||
|
|
||||||
function is_alive() {
|
function is_alive() {
|
||||||
timeoutId = 0;
|
timeoutId = 0;
|
||||||
$.get(isAliveUrl, function(data) {
|
$.ajax({url: isAliveUrl,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'jsonp',
|
||||||
|
success: function(data) {
|
||||||
|
|
||||||
var resp = data.msg.toString();
|
var resp = data.msg.toString();
|
||||||
if ('nope' == resp) {
|
if ('nope' == resp) {
|
||||||
|
@ -37,7 +40,11 @@ function is_alive() {
|
||||||
$('#refresh_message').removeClass();
|
$('#refresh_message').removeClass();
|
||||||
window.location = baseUrl + '/home/';
|
window.location = baseUrl + '/home/';
|
||||||
}
|
}
|
||||||
}, 'jsonp');
|
},
|
||||||
|
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||||
|
setTimeout(is_alive, 100);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
Loading…
Reference in a new issue