Take control over your live stream video by running it yourself. Streaming + chat out of the box.
HTML activitypubbroadcastingchatdecentralizedfederationfediversegolanghacktoberfesthlslivelivestreamowncastrtmpself-hostedstreaming-videovideo
Highlight self-mentions in messages
Nikola Forró49bf0ac7497c
diff --git a/webroot/js/message.js b/webroot/js/message.jsindex 91406c7ef8..e000c992cc 100644--- a/webroot/js/message.js+++ b/webroot/js/message.js@@ -35,11 +35,18 @@ class Message {target: '_blank'}});- return addNewlines(linked);+ const highlighted = this.highlightUsername(linked);+ return addNewlines(highlighted);}userColor() {return messageBubbleColorForString(this.author);}++ highlightUsername(message) {+ const username = document.getElementById('self-message-author').value;+ const pattern = new RegExp('@?' + username.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), 'gi');+ return message.replace(pattern, '<span class="highlighted">$&</span>');+ }}diff --git a/webroot/styles/layout.css b/webroot/styles/layout.cssindex 0339d38def..81de24302a 100644--- a/webroot/styles/layout.css+++ b/webroot/styles/layout.css@@ -624,6 +624,11 @@ h2 {border-radius: 15px;}+.message-text .highlighted {+ color: orange;+ font-weight: bold;+}+.message-text code {background-color:darkslategrey;padding: 3px;