Stackedit/js/main.js

35 lines
885 B
JavaScript
Raw Normal View History

2013-04-05 18:38:30 +00:00
// Use specific customization for sites
var configPaths = {};
2013-04-05 19:17:12 +00:00
if(location.hostname.indexOf("benweet.github.") === 0) {
2013-04-05 18:52:52 +00:00
configPaths.custo = 'custo.github';
2013-04-05 17:44:10 +00:00
}
// RequireJS configuration
2013-04-02 18:42:47 +00:00
requirejs.config({
2013-04-07 15:22:13 +00:00
waitSeconds: 0,
2013-04-05 18:38:30 +00:00
paths: configPaths,
2013-04-02 18:42:47 +00:00
shim: {
'jquery-ui': ['jquery'],
'bootstrap': ['jquery'],
'jgrowl': ['jquery'],
'layout': ['jquery-ui'],
'Markdown.Sanitizer': ['Markdown.Converter'],
'Markdown.Editor': ['Markdown.Sanitizer']
}
});
2013-04-05 17:44:10 +00:00
2013-04-10 18:14:59 +00:00
require(["jquery", "core"], function($, core) {
2013-03-24 19:42:15 +00:00
$(function() {
2013-04-07 15:27:38 +00:00
2013-04-10 18:14:59 +00:00
// If browser has detected a new application cache.
2013-04-07 15:27:38 +00:00
if (window.applicationCache
&& window.applicationCache.status === window.applicationCache.UPDATEREADY) {
window.applicationCache.swapCache();
window.location.reload();
return;
}
2013-03-27 15:28:31 +00:00
core.init();
2013-03-24 19:42:15 +00:00
});
2013-04-02 18:42:47 +00:00
});