church_streamer/app/index.js

22 lines
428 B
JavaScript
Raw Normal View History

2024-02-13 23:54:45 +00:00
const m = require('mithril')
const Status = require('./page_status')
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)
}
m.route.prefix = ''
m.route(document.getElementById('main'), '/', {
'/': Status,
})