summaryrefslogtreecommitdiff
path: root/web/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'web/index.php')
-rw-r--r--web/index.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/web/index.php b/web/index.php
index cc4be55..b722095 100644
--- a/web/index.php
+++ b/web/index.php
@@ -203,11 +203,24 @@ if (isset($room)) {
let tags = m.getAttribute("data-irc-tags");
const nickElement = m.querySelector(".nick");
+ const contentElement = m.querySelector(".content");
+ let color = null;
for (const tag of tags.split(";")) {
const p = tag.split("=");
if (p[0] == "color") {
- nickElement.style.color = p[1];
+ color = p[1];
+ break;
+ }
+ }
+
+ if (color) {
+ nickElement.style.color = color;
+
+ if (contentElement.textContent.startsWith("ACTION")) {
+ contentElement.textContent = contentElement.textContent.substring(7);
+ contentElement.style.color = color;
+ contentElement.style.fontStyle = 'italic';
}
}
}