]> _ Git - fluidbook-html5.git/commitdiff
(no commit message)
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 20 Jun 2014 17:27:51 +0000 (17:27 +0000)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 20 Jun 2014 17:27:51 +0000 (17:27 +0000)
js/main.js

index f6b72191627f77af72380092e7b39f8ed1dcde80..5537e8014fb5e0e5dd998884f7865ae5c76d7fda 100644 (file)
@@ -13,6 +13,7 @@ var resolution = 'auto';
 var OFFLINEAPP = false;
 var FINISHLOADING = false;
 var PLATFORM = 'web';
+var DEVICE_READY = false;
 
 try {
        $(function() {
@@ -70,9 +71,13 @@ try {
                document.addEventListener("resume", onAppResume, false);
 
 
+
                loadJSLibrary(
                                cordova
                                , function() {
+                                       setTimeout(function() {
+                                               onDeviceReady();
+                                       }, 5000);
                                });
        }
 
@@ -99,7 +104,11 @@ try {
        }
 
        function onDeviceReady() {
+               if (DEVICE_READY) {
+                       return;
+               }
 
+               DEVICE_READY = true;
 
                document.addEventListener("offline", onDeviceOffline, false);