hablo/share/js/main.js

15 lines
637 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 template = Template();
var metadata = Metadata({async: async, cache: cache, dom: dom, fun:fun, template: template});
var domRenderer = DomRenderer({dom: dom, fun: fun, md: md, metadata: metadata, template: template});
var navigation = Navigation({async: async, cache: cache, dom: dom, domRenderer: domRenderer, fun: fun, md: md});
2019-02-15 14:13:43 +01:00
domRenderer.replaceMarkdown();
navigation.hijackLinks();
});