diff options
Diffstat (limited to 'www/js/mobile.js')
-rw-r--r-- | www/js/mobile.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/www/js/mobile.js b/www/js/mobile.js index 3a15c4c..b23be32 100644 --- a/www/js/mobile.js +++ b/www/js/mobile.js @@ -428,3 +428,13 @@ $(function(){ signed_in(); }); +function onDeviceReady() { + var location = document.location + ''; + if ( location.indexOf('no_connection.html') < 0 && ( + navigator.network.connection.type == Connection.NONE || + navigator.network.connection.type == Connection.UNKNOWN ) ) { + document.location = 'no_connection.html'; + } +} + +document.addEventListener("deviceready", onDeviceReady, false); |