Spaces:
Running
Running
Update static/index.html
Browse files- static/index.html +18 -1
static/index.html
CHANGED
|
@@ -166,8 +166,25 @@ function addMessage(sender, message, className) {
|
|
| 166 |
// Check if the message contains a URL
|
| 167 |
const linkRegex = /(https?:\/\/[^\s]+)/g;
|
| 168 |
const formattedMessage = message.replace(linkRegex, function(url) {
|
| 169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
});
|
|
|
|
| 171 |
const icon = sender === "User" ? '<i class="fas fa-user user-icon"></i>' : '<i class="fas fa-user-tie"></i>';
|
| 172 |
messageElement.innerHTML = `${icon}<div>${formattedMessage} <span class="timestamp">${new Date().toLocaleTimeString()}</span></div>`;
|
| 173 |
messageElement.onclick = function() {
|
|
|
|
| 166 |
// Check if the message contains a URL
|
| 167 |
const linkRegex = /(https?:\/\/[^\s]+)/g;
|
| 168 |
const formattedMessage = message.replace(linkRegex, function(url) {
|
| 169 |
+
let linkText;
|
| 170 |
+
|
| 171 |
+
if (url === "https://appexchange.salesforce.com/appxListingDetail?listingId=6d605bd9-de3c-49d3-9fa4-ec3caabd5d63") {
|
| 172 |
+
linkText = "Visit this link to check out the Product Filter App.";
|
| 173 |
+
} else if (url === "https://appexchange.salesforce.com/appxListingDetail?listingId=e671f4fe-92fb-4760-99e5-7a5df5754cfe") {
|
| 174 |
+
linkText = "Visit this link to check out the Mass Approvals App.";
|
| 175 |
+
} else if (url === "https://appexchange.salesforce.com/appxListingDetail?listingId=3473ffd3-d530-462f-828f-d2c69f80d89d") {
|
| 176 |
+
linkText = "Visit this link to check out the Thumbnail Viewer App.";
|
| 177 |
+
} else if (url === "https://appexchange.salesforce.com/appxListingDetail?listingId=6d605bd9-de3c-49d3-9fa4-ec3caabd5d63") {
|
| 178 |
+
linkText = "Visit this link to check out the Currency Conversion App.";
|
| 179 |
+
} else if (url === "https://redfernstech.com/careers/") {
|
| 180 |
+
linkText = "Visit this link to check out the careers.";
|
| 181 |
+
} else {
|
| 182 |
+
linkText = "Visit this link."; // Fallback for other URLs
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
return `<a href="${url}" target="_blank">${linkText}</a>`;
|
| 186 |
});
|
| 187 |
+
|
| 188 |
const icon = sender === "User" ? '<i class="fas fa-user user-icon"></i>' : '<i class="fas fa-user-tie"></i>';
|
| 189 |
messageElement.innerHTML = `${icon}<div>${formattedMessage} <span class="timestamp">${new Date().toLocaleTimeString()}</span></div>`;
|
| 190 |
messageElement.onclick = function() {
|