diff --git a/app/frontpage/frontpage.js b/app/frontpage/frontpage.js index 585529b..0081bf4 100644 --- a/app/frontpage/frontpage.js +++ b/app/frontpage/frontpage.js @@ -83,9 +83,7 @@ const Frontpage = { }, view: function(vnode) { - console.log(this.articles) var deviceWidth = window.innerWidth - var bannerPath = '' if (this.featured && this.featured.banner) { diff --git a/app/index.js b/app/index.js index de49630..07a4d4f 100644 --- a/app/index.js +++ b/app/index.js @@ -1,6 +1,18 @@ const m = require('mithril') window.m = m +m.route.setOrig = m.route.set +m.route.set = function(path, data, options){ + m.route.setOrig(path, data, options) + window.scrollTo(0, 0) +} + +m.route.linkOrig = m.route.link +m.route.link = function(vnode){ + m.route.linkOrig(vnode) + window.scrollTo(0, 0) +} + const Authentication = require('./authentication') m.route.prefix = ''