function cordovaLoaded() {
setTimeout(function() {
onDeviceReady();
- }, 5000);
+ }, 2500);
}
function onDeviceOffline() {
if (OFFLINEAPP) {
return;
}
-
if (FINISHLOADING) {
return;
}
return;
}
+ fb('device ready');
+
DEVICE_READY = true;
document.addEventListener("offline", onDeviceOffline, false);
-
var manifest = window.localStorage.getItem('manifest.' + DATAS.id);
var fsprefix = window.sessionStorage.getItem('galfsprefix');
PLATFORM = DATAS.phonegap;
- if (DATAS.phonegap == 'ios') {
+ if (PLATFORM == 'ios') {
window.ExternalFileUtil = {
openWith: function(path, uti, success, fail, offset) {
return cordova.exec(success, fail, "ExternalFileUtil", "openWith", [path, uti, offset.left, offset.top]);
}
};
- } else if (DATAS.phonegap == 'android') {
+ } else if (PLATFORM == 'android') {
}
try {
collection = json_parse(window.localStorage.getItem('collection'));
} catch (err) {
-
+ fb('error parsing collection');
}
if (collection.res != undefined && collection.res) {
FINISHLOADING = true;
window.localStorage.setItem('offline.' + DATAS.id, '1');
}
- })
+ });
$(window).on('GALBundleLoaded', function(e, info) {
if (info.bundleName == 'content_4') {