hablo/share/js/main.js

14 lines
560 B
JavaScript
Raw Normal View History

window.addEventListener('load', function() {
2019-02-15 14:13:43 +01:00
var async = unitJS.Async();
var cache = unitJS.Cache();
var dom = unitJS.Dom();
var fun = unitJS.Fun();
var md = new Remarkable(remarkableConfig);
2019-02-15 14:13:43 +01:00
md.block.ruler.enable(['footnote']);
var comments = Comments({async: async, cache: cache, dom: dom});
var domRenderer = DomRenderer({comments: comments, fun: fun, md: md, dom: dom});
2019-02-15 14:13:43 +01:00
var navigation = Navigation({async: async, cache: cache, fun: fun, md: md, dom: dom, domRenderer: domRenderer});
domRenderer.replaceMarkdown();
navigation.hijackLinks();
});