diff --git a/scripts/communityScripts/chat/FloofChat.html b/scripts/communityScripts/chat/FloofChat.html
index b493b05090..b2576ceba6 100644
--- a/scripts/communityScripts/chat/FloofChat.html
+++ b/scripts/communityScripts/chat/FloofChat.html
@@ -160,7 +160,7 @@
return elContent;
}
-
+
// For any URLs present, unless they are already identified within
// an `a` element, linkify them.
function _linkifyUrls(matches, $el) {
@@ -181,47 +181,53 @@
case ext == "JPG":
case ext == "GIF":
case ext == "JPEG":
- elContent = elContent.replace(this, "

" + this
- + "📲");
+ var replaceWith = "
";
+ replaceWith += "
";
+ replaceWith += "" + this + "";
+ replaceWith += "📲";
+
+ elContent = elContent.replace(this, replaceWith);
break;
case ext == "iframe":
- elContent = elContent.replace(this, "
");
+ var replaceWith = "
";
+ replaceWith += "";
+
+ elContent = elContent.replace(this, replaceWith);
break;
case ext == "webm":
- elContent = elContent.replace(this, "
" + this
- + "📲");
+ var replaceWith = "
";
+ replaceWith += "";
+ replaceWith += "
";
+ replaceWith += "" + this + "";
+ replaceWith += "📲";
+
+ elContent = elContent.replace(this, replaceWith);
break;
case protocol === "HIFI":
case protocol === "hifi":
elContent = elContent.replace(this, "
" + this + "");
break;
- case !!this.match(/(https?:\/\/)?(www\.)?(youtube\.com\/watch\?v=|youtu\.be\/)([^& \n<]+)(?:[^ \n<]+)?/g):
+ case !!this.match(/(https?:\/\/)?(www\.)?(youtube\.com\/watch\?v=|youtu\.be\/)([^& \n<]+)(?:[^ \n<]+)?/g):
var youtubeMatch = this.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);
if (youtubeMatch && youtubeMatch[2].length == 11) {
- elContent = "
" + this
- + "📲";
+ var replaceWith = "
";
+ replaceWith += "";
+ replaceWith += "
";
+ replaceWith += "" + this + "";
+ replaceWith += "📲";
+
+ elContent = replaceWith;
break;
}
// else fall through to default
default:
- elContent = elContent.replace(this, "
" + this
- + "📲");
+ var replaceWith = "
";
+ replaceWith += "" + this + "";
+ replaceWith += "📲";
+
+ elContent = elContent.replace(this, replaceWith);
break;
}
diff --git a/scripts/communityScripts/notificationCore/notificationCore.js b/scripts/communityScripts/notificationCore/notificationCore.js
index 7920a575ec..51e1eadde1 100644
--- a/scripts/communityScripts/notificationCore/notificationCore.js
+++ b/scripts/communityScripts/notificationCore/notificationCore.js
@@ -183,7 +183,7 @@ Controller.mousePressEvent.connect(function (event) {
for (var i = 0; i < notificationList.length; i++) {
if (overlay === notificationList[i].id) {
Overlays.deleteOverlay(notificationList[i].id)
- Messages.sendMessage(MAIN_CHAT_APP_CHANNEL, JSON.stringify({
+ Messages.sendLocalMessage(MAIN_CHAT_APP_CHANNEL, JSON.stringify({
type: "ShowChatWindow",
}));
}