From 92d6d5e1d4b35521ac4644c6436357e71f8476d2 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 6 Jan 2024 14:40:15 +0100 Subject: [PATCH] Sanity-check decaffeinate app.views.Content --- assets/javascripts/views/content/content.js | 41 ++++++++++----------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/assets/javascripts/views/content/content.js b/assets/javascripts/views/content/content.js index 28dd761c..cf50622e 100644 --- a/assets/javascripts/views/content/content.js +++ b/assets/javascripts/views/content/content.js @@ -12,27 +12,25 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md */ app.views.Content = class Content extends app.View { - static initClass() { - this.el = "._content"; - this.loadingClass = "_content-loading"; - - this.events = { click: "onClick" }; - - this.shortcuts = { - altUp: "scrollStepUp", - altDown: "scrollStepDown", - pageUp: "scrollPageUp", - pageDown: "scrollPageDown", - pageTop: "scrollToTop", - pageBottom: "scrollToBottom", - altF: "onAltF", - }; - - this.routes = { - before: "beforeRoute", - after: "afterRoute", - }; - } + static el = "._content"; + static loadingClass = "_content-loading"; + + static events = { click: "onClick" }; + + static shortcuts = { + altUp: "scrollStepUp", + altDown: "scrollStepDown", + pageUp: "scrollPageUp", + pageDown: "scrollPageDown", + pageTop: "scrollToTop", + pageBottom: "scrollToBottom", + altF: "onAltF", + }; + + static routes = { + before: "beforeRoute", + after: "afterRoute", + }; init() { this.scrollEl = app.isMobile() @@ -260,7 +258,6 @@ app.views.Content = class Content extends app.View { ); } }; -app.views.Content.initClass(); function __guard__(value, transform) { return typeof value !== "undefined" && value !== null