From 467390bc032585f28da6203f891764f4a66c33b7 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Sun, 22 Jan 2023 22:13:01 +0100 Subject: Trim some resources --- static/js/blog.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'static/js') diff --git a/static/js/blog.js b/static/js/blog.js index a49a72f..68c13da 100644 --- a/static/js/blog.js +++ b/static/js/blog.js @@ -2,27 +2,25 @@ /* globals window */ -((window) => { +((w) => { const internals = { - kEntryPoint: '.event-details', - // Application entry point, for now just band to keyboard main() { - window.document.addEventListener('keydown', internals._onKeyDown); + w.document.addEventListener('keydown', internals._onKeyDown); }, // Handles key events to point to the correct blog post. - _onKeyDown(event) { + _onKeyDown(e) { - if (['1','2','3'].indexOf(event.key) > -1) { - window.location.hash = event.key; + if (['1','2','3'].indexOf(e.key) > -1) { + w.location.hash = e.key; } } }; - window.addEventListener('load', internals.main); + w.addEventListener('load', internals.main); })(window); -- cgit