Working on network online offline detection
This commit is contained in:
@@ -63,5 +63,29 @@ exports.load_config = function () {
|
||||
} else {
|
||||
//close();
|
||||
}
|
||||
//console.log(config);
|
||||
return config;
|
||||
}
|
||||
|
||||
exports.currently_online = function() {
|
||||
//alert('You are currently online');
|
||||
console.log('Currently online');
|
||||
app_online = true;
|
||||
document.getElementById('network_status1').classList.remove('btn-warning');
|
||||
document.getElementById('network_status1').classList.add('btn-success');
|
||||
document.getElementById('network_status1').innerHTML = '<span class="fas fa-check"></span> <span class="fas fa-globe"></span> Currently Online';
|
||||
//document.getElementById('network_status1').innerHTML('Currently Online');
|
||||
}
|
||||
|
||||
exports.currently_offline = function() {
|
||||
//alert('You are currently offline');
|
||||
console.log('Currently offline');
|
||||
app_online = false;
|
||||
document.getElementById('network_status1').classList.remove('btn-success');
|
||||
document.getElementById('network_status1').classList.add('btn-warning');
|
||||
document.getElementById('network_status1').innerHTML = '<span class="fas fa-exclamation"></span> <span class="fas fa-globe"></span> Currently Offline';
|
||||
//document.getElementById('network_status1').innerHTML('Currently Offline');
|
||||
}
|
||||
|
||||
//window.addEventListener('online', currently_online);
|
||||
//window.addEventListener('offline', currently_offline);
|
||||
|
||||
Reference in New Issue
Block a user