diff options
author | Andrew Dolgov <[email protected]> | 2021-02-19 17:15:22 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-19 17:15:22 +0300 |
commit | d445530fa08cdbe2088150a3e7d23596eab9b142 (patch) | |
tree | 0c9e9a44cfd5f38835857fd961ee17c11e9e54f9 /plugins/note/note.js | |
parent | 4fa8450d38ccafdfa1117aa8a6fa570ce9fecb09 (diff) |
format note on the client
Diffstat (limited to 'plugins/note/note.js')
-rw-r--r-- | plugins/note/note.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/note/note.js b/plugins/note/note.js index d42fca2c1..a46acb355 100644 --- a/plugins/note/note.js +++ b/plugins/note/note.js @@ -13,16 +13,14 @@ Plugins.Note = { dialog.hide(); if (reply) { - const elem = App.byId("POSTNOTE-" + id); + App.findAll(`div[data-note-for="${reply.id}"]`).forEach((elem) => { + elem.querySelector(".body").innerHTML = reply.note; - if (elem) { - elem.innerHTML = reply.note; - - if (reply.raw_length != 0) - Element.show(elem); + if (reply.note) + elem.show(); else - Element.hide(elem); - } + elem.hide(); + }); } }); } |