aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/assets/scripts.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/assets/scripts.js b/src/main/assets/scripts.js
index 94f79424..f3aea835 100644
--- a/src/main/assets/scripts.js
+++ b/src/main/assets/scripts.js
@@ -27,7 +27,7 @@ function autosize(el) {
* @returns {string} HTML markup for the selected icon
*/
function evilIcon(name) {
- return `<div class="icon icon--${name}"><svg class="icon__cnt"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/sprite.svg#${name}-icon"></use></svg></div>`
+ return `<div data-icon="${name}" data-size="s"></div>`
}
/* eslint-disable only-ascii/only-ascii */
@@ -284,7 +284,7 @@ function showCommentForm(mid, rid) {
</form>`
formTarget.insertAdjacentHTML('afterend', formHtml)
formTarget.remove()
-
+ renderIcons()
let form = /** @type {HTMLFormElement} */ (reply.querySelector('form'))
let submitButton = /** @type {HTMLInputElement} */ (form.querySelector('input[type="submit"]'))
@@ -395,6 +395,7 @@ function openDialog(html, image) {
document.addEventListener('keydown', closeDialogListener)
document.querySelector('#dialogb').addEventListener('click', closeDialog)
document.querySelector('#dialogc').addEventListener('click', closeDialog)
+ renderIcons()
}
function closeDialog() {