diff options
| author | supahgreg <supahgreg@users.noreply.github.com> | 2025-10-14 22:43:09 +0000 |
|---|---|---|
| committer | supahgreg <supahgreg@users.noreply.github.com> | 2025-10-14 22:43:09 +0000 |
| commit | 6d3619724735cad09bcb24110403d21479d1fd4d (patch) | |
| tree | 1dd90b777cfdcea698ac2fd966eb13f46aa107b6 /js/App.js | |
| parent | 73f9d7bd6c8f222145c29c91eeb43ba7c7677496 (diff) | |
Remove various Element and Array prototype extensions (and similar).
Diffstat (limited to 'js/App.js')
| -rw-r--r-- | js/App.js | 20 |
1 files changed, 8 insertions, 12 deletions
@@ -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(); }; |