2013-05-27 19:45:33 +00:00
|
|
|
define([
|
2013-05-27 22:13:41 +00:00
|
|
|
"underscore",
|
|
|
|
"config"
|
2013-05-27 19:45:33 +00:00
|
|
|
], function(_) {
|
2013-05-29 19:55:23 +00:00
|
|
|
|
|
|
|
var settings = {
|
|
|
|
layoutOrientation: "horizontal",
|
|
|
|
lazyRendering: true,
|
2013-06-27 23:10:04 +00:00
|
|
|
editorFontFamily: "Courier New, Courier, monospace",
|
2013-05-29 19:55:23 +00:00
|
|
|
editorFontSize: 14,
|
2013-06-02 19:35:44 +00:00
|
|
|
defaultContent: "\n\n\n> Written with [StackEdit](" + MAIN_URL + ").",
|
|
|
|
commitMsg: "Published with " + MAIN_URL,
|
2013-05-29 19:55:23 +00:00
|
|
|
template: [
|
2013-05-27 19:45:33 +00:00
|
|
|
'<!DOCTYPE html>\n',
|
2013-05-29 19:55:23 +00:00
|
|
|
'<html>\n',
|
|
|
|
'<head>\n',
|
2013-06-02 19:35:44 +00:00
|
|
|
'<meta charset="utf-8">\n',
|
2013-05-29 19:55:23 +00:00
|
|
|
'<title><%= documentTitle %></title>\n',
|
2013-06-02 19:35:44 +00:00
|
|
|
'<link rel="stylesheet" href="',
|
|
|
|
MAIN_URL,
|
|
|
|
'css/main-min.css" />\n',
|
2013-06-13 23:25:32 +00:00
|
|
|
'<script type="text/javascript" src="',
|
|
|
|
MAIN_URL,
|
|
|
|
'lib/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>\n',
|
2013-05-29 19:55:23 +00:00
|
|
|
'</head>\n',
|
|
|
|
'<body><%= documentHTML %></body>\n',
|
|
|
|
'</html>'
|
|
|
|
].join(""),
|
|
|
|
sshProxy: SSH_PROXY_URL,
|
|
|
|
extensionSettings: {}
|
|
|
|
};
|
|
|
|
|
2013-06-03 22:19:52 +00:00
|
|
|
try {
|
2013-05-29 19:55:23 +00:00
|
|
|
_.extend(settings, JSON.parse(localStorage.settings));
|
|
|
|
}
|
2013-06-03 22:19:52 +00:00
|
|
|
catch(e) {
|
|
|
|
// Ignore parsing error
|
|
|
|
}
|
2013-05-29 19:55:23 +00:00
|
|
|
|
|
|
|
return settings;
|
2013-05-27 19:45:33 +00:00
|
|
|
});
|