This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
momo/assets/scripts/momo.coffee

40 lines
711 B
CoffeeScript

class Momo
manifest:
meta:
manifestUrl: "index.json"
contructor: (args...) ->
@bindEvents()
bindEvents: ->
# Navigation Handler
xindow.addEventListener "hashchange", @onHashChange, false
document.addEventListener "deviceready", @onDeviceReady, false
init: ->
@initFileSystem()
@initIndex()
@backupAssets()
@loadLocalManifest()
@checkForUpdate(app.start, app.start)
@updateTimeout = setTimeout( app.checkForLastUpdateCheck, app.manifest.meta.updateFreq )
initFileSystem: ->
FastClick.attach(document.body)
start: ->
@loadManifest()
loadManifest: ->
manifest = JSON.parse
update: ->
updateAvailable: (y, n, f) ->