Added smart custo detection
This commit is contained in:
parent
0bdf2cac22
commit
30eb0d88ca
@ -1 +1 @@
|
|||||||
CACHE MANIFEST
# v21
CACHE:
index.html
css/bootstrap.css
css/jgrowl.css
css/main.css
js/prod/custo.js
js/async-runner.js
js/bootstrap.js
js/config.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
# v24
CACHE:
index.html
css/bootstrap.css
css/jgrowl.css
css/main.css
js/prod/custo.js
js/async-runner.js
js/bootstrap.js
js/config.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:
*
|
||||||
|
@ -40,9 +40,9 @@
|
|||||||
src="img/stackedit-16.png" /> <b class="caret"></b></a>
|
src="img/stackedit-16.png" /> <b class="caret"></b></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a class="action-download-md" href="#"><i
|
<li><a class="action-download-md" href="#"><i
|
||||||
class="icon-download-alt"></i> Download as MD</a></li>
|
class="icon-download-alt"></i> Save as MD</a></li>
|
||||||
<li><a class="action-download-html" href="#"><i
|
<li><a class="action-download-html" href="#"><i
|
||||||
class="icon-download-alt"></i> Download as HTML</a></li>
|
class="icon-download-alt"></i> Save as HTML</a></li>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
<li class="dropdown-submenu"><a href="#"><i
|
<li class="dropdown-submenu"><a href="#"><i
|
||||||
class="icon-gdrive"></i> Google Drive</a>
|
class="icon-gdrive"></i> Google Drive</a>
|
||||||
|
15
js/main.js
15
js/main.js
@ -1,9 +1,13 @@
|
|||||||
|
// Use specific customization for production
|
||||||
|
var custoPath = 'dev/custo';
|
||||||
|
if(location.hostname == "benweet.github.com") {
|
||||||
|
custoPath = 'prod/custo';
|
||||||
|
}
|
||||||
|
|
||||||
|
// RequireJS configuration
|
||||||
requirejs.config({
|
requirejs.config({
|
||||||
paths: {
|
paths: {
|
||||||
custo: [
|
'custo': custoPath
|
||||||
'dev/custo',
|
|
||||||
'prod/custo'
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
shim: {
|
shim: {
|
||||||
'jquery-ui': ['jquery'],
|
'jquery-ui': ['jquery'],
|
||||||
@ -14,10 +18,11 @@ requirejs.config({
|
|||||||
'Markdown.Editor': ['Markdown.Sanitizer']
|
'Markdown.Editor': ['Markdown.Sanitizer']
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
require(["jquery", "core", "file-manager", "config", "custo"], function($, core, fileManager) {
|
require(["jquery", "core", "file-manager", "config", "custo"], function($, core, fileManager) {
|
||||||
$(function() {
|
$(function() {
|
||||||
|
|
||||||
// If browser downloaded a new app cache.
|
// If browser detected a new application cache.
|
||||||
if (window.applicationCache
|
if (window.applicationCache
|
||||||
&& window.applicationCache.status == window.applicationCache.UPDATEREADY) {
|
&& window.applicationCache.status == window.applicationCache.UPDATEREADY) {
|
||||||
window.applicationCache.swapCache();
|
window.applicationCache.swapCache();
|
||||||
|
Loading…
Reference in New Issue
Block a user