summaryrefslogtreecommitdiff
path: root/js/App.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/App.js')
-rw-r--r--js/App.js20
1 files changed, 8 insertions, 12 deletions
diff --git a/js/App.js b/js/App.js
index e82e45d0c..b88c08062 100644
--- a/js/App.js
+++ b/js/App.js
@@ -210,7 +210,7 @@ const App = {
if (callback) {
link.onload = function() {
- document.querySelector("body").removeClassName("css_loading");
+ document.body.classList.remove('css_loading');
callback();
};
@@ -221,9 +221,9 @@ const App = {
this.nightModeChanged(mql.matches, link);
- document.querySelector("head").appendChild(link);
+ document.head.appendChild(link);
} else {
- document.querySelector("body").removeClassName("css_loading");
+ document.body.classList.remove('css_loading');
if (callback) callback();
}
@@ -1238,15 +1238,11 @@ const App = {
this.hotkey_actions["goto_prefs"] = () => {
App.openPreferences();
};
- this.hotkey_actions["select_article_cursor"] = () => {
- const id = Article.getUnderPointer();
- if (id) {
- const row = App.byId(`RROW-${id}`);
-
- if (row)
- row.toggleClassName("Selected");
- }
- };
+ this.hotkey_actions['select_article_cursor'] = () => {
+ const id = Article.getUnderPointer();
+ if (id)
+ App.byId(`RROW-${id}`)?.classList.toggle('Selected');
+ };
this.hotkey_actions["create_label"] = () => {
CommonDialogs.addLabel();
};