diff options
| author | supahgreg <supahgreg@users.noreply.github.com> | 2025-10-14 23:18:13 +0000 |
|---|---|---|
| committer | supahgreg <supahgreg@users.noreply.github.com> | 2025-10-14 23:18:13 +0000 |
| commit | 6bd52b28c201c2afb43397c1413000d47563da0b (patch) | |
| tree | 9a992f39573f34a0901e96e52f53a58446d2f60b /plugins/note | |
| parent | 6d3619724735cad09bcb24110403d21479d1fd4d (diff) | |
Remove 'App.findAll()', which was essentially an alias of 'document.querySelectorAll()'.
Diffstat (limited to 'plugins/note')
| -rw-r--r-- | plugins/note/note.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/note/note.js b/plugins/note/note.js index 00deb0543..98b639358 100644 --- a/plugins/note/note.js +++ b/plugins/note/note.js @@ -5,7 +5,7 @@ require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) { Plugins.Note = { set_click_handler: function() { - App.findAll(".article-note[data-note-for]").forEach((note) => { + document.querySelectorAll('.article-note[data-note-for]').forEach((note) => { note.onclick = function() { Plugins.Note.edit(this.getAttribute('data-note-for')); } @@ -23,13 +23,9 @@ require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) { dialog.hide(); if (reply) { - App.findAll(`div[data-note-for="${reply.id}"]`).forEach((elem) => { - elem.querySelector(".body").innerHTML = reply.note; - - if (reply.note) - elem.show(); - else - elem.hide(); + document.querySelectorAll(`div[data-note-for="${reply.id}"]`).forEach((elem) => { + elem.querySelector('.body').innerHTML = reply.note; + reply.note ? elem.show() : elem.hide(); }); } }); |