Stackedit/js/main.js
2013-05-14 00:26:55 +01:00

30 lines
894 B
JavaScript

// RequireJS configuration
requirejs.config({
waitSeconds: 0,
paths: {
MathJax: '../lib/MathJax/MathJax.js?config=TeX-AMS_HTML'
},
shim: {
'jquery-ui': ['jquery'],
'bootstrap': ['jquery'],
'jgrowl': ['jquery'],
'layout': ['jquery-ui'],
'Markdown.Extra': ['Markdown.Converter', 'prettify'],
'Markdown.Editor': ['Markdown.Extra']
}
});
require(["jquery", "file-manager", "synchronizer", "publisher"], function($) {
$(function() {
// If browser has detected a new application cache.
if (window.applicationCache) {
window.applicationCache.addEventListener('updateready', function(e) {
if(window.applicationCache.status === window.applicationCache.UPDATEREADY) {
window.applicationCache.swapCache();
window.location.reload();
}
}, false);
}
});
});