From f85559735b794682057e5b8d3854373f4d10dbb9 Mon Sep 17 00:00:00 2001 From: supahgreg Date: Tue, 14 Oct 2025 23:22:00 +0000 Subject: Remove 'App.byId()', which was essentially an alias of 'document.getElementById()'. --- js/PrefHelpers.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js/PrefHelpers.js') diff --git a/js/PrefHelpers.js b/js/PrefHelpers.js index cf3f03bf2..f931630c8 100644 --- a/js/PrefHelpers.js +++ b/js/PrefHelpers.js @@ -8,7 +8,7 @@ const Helpers = { return Tables.getSelected("app-password-list"); }, updateContent: function(data) { - App.byId("app_passwords_holder").innerHTML = data; + document.getElementById("app_passwords_holder").innerHTML = data; dojo.parser.parse("app_passwords_holder"); }, removeSelected: function() { @@ -264,7 +264,7 @@ const Helpers = { apply: function() { xhr.post("backend.php", this.attr('value'), () => { Element.show("css_edit_apply_msg"); - App.byId("user_css_style").innerText = this.attr('value'); + document.getElementById("user_css_style").innerText = this.attr('value'); }); }, execute: function () { @@ -784,7 +784,7 @@ const Helpers = { }, OPML: { import: function() { - const opml_file = App.byId("opml_file"); + const opml_file = document.getElementById("opml_file"); if (opml_file.value.length === 0) { alert(__("Please choose an OPML file first.")); @@ -826,7 +826,7 @@ const Helpers = { dialog.show(); }; - xhr.send(new FormData(App.byId("opml_import_form"))); + xhr.send(new FormData(document.getElementById("opml_import_form"))); return false; } -- cgit v1.2.3-54-g00ecf 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/PrefHelpers.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