From feff8c672e5c824ae7e5a9183c9744a1b2f513d4 Mon Sep 17 00:00:00 2001 From: Benoit Schweblin Date: Sun, 7 Apr 2013 16:27:38 +0100 Subject: [PATCH] Added Dropbox synchronization --- cache.manifest | 2 +- js/main.js | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cache.manifest b/cache.manifest index 410f7995..25bf23aa 100644 --- a/cache.manifest +++ b/cache.manifest @@ -1 +1 @@ -CACHE MANIFEST # v32 CACHE: index.html css/bootstrap.css css/jgrowl.css css/main.css js/async-runner.js js/bootstrap.js js/config.js js/custo.github.js js/dropbox.js js/gdrive.js js/jgrowl.js js/jquery.js js/jquery-ui.js js/layout.js js/main.js js/Markdown.Converter.js js/Markdown.Editor.js js/Markdown.Sanitizer.js js/require.js js/synchronizer.js img/ajax-loader.gif img/dropbox.png img/gdrive.png img/glyphicons-halflings.png img/glyphicons-halflings-white.png img/stackedit-16.png img/stackedit-32.ico NETWORK: * +CACHE MANIFEST # v33 CACHE: index.html css/bootstrap.css css/jgrowl.css css/main.css js/async-runner.js js/bootstrap.js js/config.js js/custo.github.js js/dropbox.js js/gdrive.js js/jgrowl.js js/jquery.js js/jquery-ui.js js/layout.js js/main.js js/Markdown.Converter.js js/Markdown.Editor.js js/Markdown.Sanitizer.js js/require.js js/synchronizer.js img/ajax-loader.gif img/dropbox.png img/gdrive.png img/glyphicons-halflings.png img/glyphicons-halflings-white.png img/stackedit-16.png img/stackedit-32.ico NETWORK: * diff --git a/js/main.js b/js/main.js index fa789f0a..6611ead1 100644 --- a/js/main.js +++ b/js/main.js @@ -20,6 +20,15 @@ requirejs.config({ require(["jquery", "core", "file-manager", "config", "custo"], function($, core, fileManager) { $(function() { + + // If browser detected a new application cache. + if (window.applicationCache + && window.applicationCache.status === window.applicationCache.UPDATEREADY) { + window.applicationCache.swapCache(); + window.location.reload(); + return; + } + core.init(); fileManager.init(); });