From 5355da09606035d3fcb05cc3bccc13e4ff888a91 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sun, 9 Oct 2016 21:08:33 +0800 Subject: Workaround for circular require --- public/js/pretty.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'public/js') diff --git a/public/js/pretty.js b/public/js/pretty.js index ebdec2a9..6b551c17 100644 --- a/public/js/pretty.js +++ b/public/js/pretty.js @@ -1,4 +1,4 @@ -var extra = require('./extra') +var extra = require('./extra'); var md = extra.md; var finishView = extra.finishView; var autoLinkify = extra.autoLinkify; @@ -124,6 +124,10 @@ function scrollToBottom() { }, 100, "linear"); } +window.scrollToTop = scrollToTop; +window.scrollToBottom = scrollToBottom; + module.exports = { - scrollToBottom: scrollToBottom + scrollToBottom: scrollToBottom, + scrollToTop: scrollToTop } -- cgit v1.2.3