mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-01 15:48:32 -04:00
Resolve dependency module requiring
* es5 style module exports * remove script tag require * webpack config ProvidePlugin Note that this commit only fix JavaScript module loading runtime error.
This commit is contained in:
parent
0be342c44d
commit
963a435ae1
9 changed files with 175 additions and 59 deletions
public/js
|
@ -1,3 +1,16 @@
|
|||
var extra = require('./extra')
|
||||
var md = extra.md;
|
||||
var finishView = extra.finishView;
|
||||
var autoLinkify = extra.autoLinkify;
|
||||
var deduplicatedHeaderId = extra.deduplicatedHeaderId;
|
||||
var renderTOC = extra.renderTOC;
|
||||
var generateToc = extra.generateToc;
|
||||
var smoothHashScroll = extra.smoothHashScroll;
|
||||
var postProcess = extra.postProcess;
|
||||
var lastchangeui = extra.lastchangeui;
|
||||
var updateLastChange = extra.updateLastChange;
|
||||
var preventXSS = require('./render').preventXSS;
|
||||
|
||||
var markdown = $(".markdown-body");
|
||||
var text = $('<textarea/>').html(markdown.html()).text();
|
||||
var lastMeta = md.meta;
|
||||
|
@ -109,4 +122,8 @@ function scrollToBottom() {
|
|||
$('body, html').stop(true, true).animate({
|
||||
scrollTop: $(document.body)[0].scrollHeight
|
||||
}, 100, "linear");
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
scrollToBottom: scrollToBottom
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue