diff --git a/client/app.js b/client/app.js index 1fae0d7..0d71957 100644 --- a/client/app.js +++ b/client/app.js @@ -4,8 +4,8 @@ import './process' import Timer from './components/Timer' -// request permission on page load -document.addEventListener('DOMContentLoaded', () => { +$(() => { + // request permission on page load if (!Notification) { alert('Desktop notifications not available in your browser. Try Chromium, Chrome or Firefox.') return @@ -13,9 +13,7 @@ document.addEventListener('DOMContentLoaded', () => { if (Notification.permission !== 'granted') Notification.requestPermission() -}) -$(() => { const timer = $('.timer') Timer.render().replace(timer).getWidget() diff --git a/client/components/Timer/index.js b/client/components/Timer/index.js index 7c5b6b2..d5b0ffd 100644 --- a/client/components/Timer/index.js +++ b/client/components/Timer/index.js @@ -1,5 +1,5 @@ import markoWidgets from 'marko-widgets' -import template from './template.marko.js' +import template from './template.marko' import timeFilter from '../../util/time-filter'