From 3ff3c605b4405dcd66c6ae978566664633a2f68e Mon Sep 17 00:00:00 2001 From: supahgreg Date: Tue, 14 Oct 2025 23:26:19 +0000 Subject: Remove 'App.find()', which was essentially an alias of 'document.querySelector()'. --- js/App.js | 7 ++----- js/Feeds.js | 4 ++-- js/PrefHelpers.js | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) (limited to 'js') diff --git a/js/App.js b/js/App.js index efc5d399c..5befe1fe8 100644 --- a/js/App.js +++ b/js/App.js @@ -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(); -- cgit v1.2.3-54-g00ecf