mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +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() {
|
||||
timeoutId = 0;
|
||||
$.get(isAliveUrl, function(data) {
|
||||
$.ajax({url: isAliveUrl,
|
||||
type: 'GET',
|
||||
dataType: 'jsonp',
|
||||
success: function(data) {
|
||||
|
||||
var resp = data.msg.toString();
|
||||
if ('nope' == resp) {
|
||||
|
@ -37,7 +40,11 @@ function is_alive() {
|
|||
$('#refresh_message').removeClass();
|
||||
window.location = baseUrl + '/home/';
|
||||
}
|
||||
}, 'jsonp');
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
setTimeout(is_alive, 100);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
|
Loading…
Reference in a new issue