Skip to content

Commit

Permalink
Emote Side Panel 1.1.1
Browse files Browse the repository at this point in the history
* Changed: Remove unnecessary use of `innerHTML`, replacing it with `textContent`.
  • Loading branch information
SirStendec committed Oct 9, 2024
1 parent 7ae3425 commit 48b8d13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/emote-side-panel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ class EmoteSidePanel extends Addon {
}

updateCount(emote) {
const len = emote.instances.length;
emote.element.querySelector("span").innerHTML = ((len == 1) ? "" : "x" + len);
const len = emote.instances.length,
label = emote.element.querySelector("span");

if (label)
label.textContent = (len <= 1) ? "" : `x${len}`;
}

updateElement(emote) {
Expand Down
4 changes: 2 additions & 2 deletions src/emote-side-panel/manifest.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"enabled": true,
"requires": [],
"version": "1.1.0",
"version": "1.1.1",
"short_name": "EmoteSidePanel",
"name": "Emote Side Panel",
"author": "amartini",
"description": "Declutter the chat by sending emote-only messages to a side panel.",
"website": "https://github.com/amartini",
"created": "2024-03-31T22:15:03.336Z",
"updated": "2024-04-12T17:37:03.032Z"
"updated": "2024-10-09T21:44:27.189Z"
}

0 comments on commit 48b8d13

Please sign in to comment.