From 55c12d80f64c0ea14c35e038b83f506e562ffa03 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 18 Jul 2014 17:00:59 +0000 Subject: [PATCH] --- js/main.js | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/js/main.js b/js/main.js index 5e6ce2f0..558a3a95 100644 --- a/js/main.js +++ b/js/main.js @@ -28,21 +28,21 @@ try { if (Modernizr.applicationcache) { applicationCache.addEventListener('updateready', cacheUpdated, false); applicationCache.addEventListener('downloading', function(e) { - console.log('cache downloading'); + fb('cache downloading'); }, false); applicationCache.addEventListener('cached', function(e) { - console.log('cache completed'); + fb('cache completed'); fluidbook.video.initCache(); }, false); applicationCache.addEventListener('noupdate', function(e) { - console.log('cache nothing to update'); + fb('cache nothing to update'); fluidbook.video.initCache(); }, false); applicationCache.addEventListener('checking', function(e) { - console.log('cache check'); + fb('cache check'); }, false); applicationCache.addEventListener('error', function(e) { - console.log('cache error'); + fb('cache error'); }, false); } @@ -72,7 +72,7 @@ try { cordovaPath , cordovaLoaded); if (window.cordova) { - console.log('cordova already loaded'); + fb('cordova already loaded'); cordovaLoaded(); } } @@ -109,7 +109,7 @@ try { return; } - console.log('device ready !'); + fb('device ready !'); DEVICE_READY = true; @@ -135,7 +135,7 @@ try { try { collection = json_parse(window.localStorage.getItem('collection')); } catch (err) { - console.error('error parsing collection'); + fb('error parsing collection'); } if (collection.res != undefined && collection.res) { @@ -147,16 +147,13 @@ try { } if (!OFFLINEAPP) { - console.log('set manifest from manifest pub'); + fb('set manifest from manifest pub'); manifest = collection.manifestPub[DATAS.id]; } - console.log(manifest.bundles[0].name); - console.log(manifest.bundles[0].contents[0]); - console.log(manifest.bundles.length); if (navigator.onLine && !OFFLINEAPP) { - console.log('init online'); + fb('init online'); var readyToLoad = false; var finishedLoading = false; @@ -176,20 +173,20 @@ try { gal.check('extras', function(info) { if (info.success) { - console.log('set offline flag'); + fb('set offline flag'); FINISHLOADING = true; window.localStorage.setItem('offline.' + DATAS.id, '1'); } }); $(window).on('GALBundleLoaded', function(e, info) { - console.log('Loaded :: ' + info.bundleName); + fb('Loaded :: ' + info.bundleName); if (info.bundleName == 'content_4') { fluidbook.changeAddress(); } if (info.bundleName == 'extras') { - console.log('set offline flag'); + fb('set offline flag'); FINISHLOADING = true; window.localStorage.setItem('offline.' + DATAS.id, '1'); } -- 2.39.5