diff options
| author | supahgreg <supahgreg@users.noreply.github.com> | 2025-10-14 23:26:19 +0000 |
|---|---|---|
| committer | supahgreg <supahgreg@users.noreply.github.com> | 2025-10-14 23:26:46 +0000 |
| commit | 3ff3c605b4405dcd66c6ae978566664633a2f68e (patch) | |
| tree | 2db559fdfada881be2bde4b2634d96fe4e57c145 /js | |
| parent | f85559735b794682057e5b8d3854373f4d10dbb9 (diff) | |
Remove 'App.find()', which was essentially an alias of 'document.querySelector()'.
Diffstat (limited to 'js')
| -rw-r--r-- | js/App.js | 7 | ||||
| -rw-r--r-- | js/Feeds.js | 4 | ||||
| -rw-r--r-- | js/PrefHelpers.js | 2 |
3 files changed, 5 insertions, 8 deletions
@@ -140,9 +140,6 @@ const App = { } } }, - find: function(query) { - return document.querySelector(query) - }, dialogOf: function (elem) { // elem could be a Dijit widget @@ -461,7 +458,7 @@ const App = { }, handleRpcJson: function(reply) { - const netalert = App.find(".net-alert"); + const netalert = document.querySelector('.net-alert'); if (reply) { const error = reply['error']; @@ -518,7 +515,7 @@ const App = { } if (k === "recent_log_events") { - const alert = App.find(".log-alert"); + const alert = document.querySelector('.log-alert'); if (alert) { v > 0 ? alert.show() : alert.hide(); diff --git a/js/Feeds.js b/js/Feeds.js index 1328b704a..af7a6cc54 100644 --- a/js/Feeds.js +++ b/js/Feeds.js @@ -143,8 +143,8 @@ const Feeds = { }, onViewModeChanged: function() { // TODO: is this still needed? - App.find("body").setAttribute("view-mode", - dijit.byId("toolbar-main").getValues().view_mode); + document.body.setAttribute('view-mode', + dijit.byId('toolbar-main').getValues().view_mode); return Feeds.reloadCurrent(''); }, diff --git a/js/PrefHelpers.js b/js/PrefHelpers.js index f931630c8..0d8702bae 100644 --- a/js/PrefHelpers.js +++ b/js/PrefHelpers.js @@ -728,7 +728,7 @@ const Helpers = { dialog.plugins_to_update.push(p.plugin); const update_button = dijit.getEnclosingWidget( - App.find(`*[data-update-btn-for-plugin="${p.plugin}"]`)); + document.querySelector(`*[data-update-btn-for-plugin="${p.plugin}"]`)); if (update_button) update_button.domNode.show(); |