Spaces:
Runtime error
Runtime error
opening links in new tab
Browse files- static/chatbot.js +2 -2
static/chatbot.js
CHANGED
@@ -26,7 +26,7 @@ $(document).ready(function() {
|
|
26 |
if (hasHtml) {
|
27 |
$messageText = $('<p>').html(message);
|
28 |
} else {
|
29 |
-
$messageText = $('<p>').html(message.replace(/(https?:\/\/[^\s,]+)/g, '<a href="$1">$1</a>').replace(/(SOURCES:)/, '<br>$1'));
|
30 |
}
|
31 |
// var $messageText = $('<p>').html(message.replace(/(https?:\/\/[^\s,]+)/g, '<a href="$1">$1</a>'));
|
32 |
|
@@ -76,7 +76,7 @@ $(document).ready(function() {
|
|
76 |
});
|
77 |
|
78 |
// Initial message
|
79 |
-
displayMessage('Learn about <a href="https://makerlab.illinois.edu/">Makerlab</a>', false, true);
|
80 |
|
81 |
// Function to minimize the widget
|
82 |
function minimizeWidget() {
|
|
|
26 |
if (hasHtml) {
|
27 |
$messageText = $('<p>').html(message);
|
28 |
} else {
|
29 |
+
$messageText = $('<p>').html(message.replace(/(https?:\/\/[^\s,]+)/g, '<a href="$1" target="_blank">$1</a>').replace(/(SOURCES:)/, '<br>$1'));
|
30 |
}
|
31 |
// var $messageText = $('<p>').html(message.replace(/(https?:\/\/[^\s,]+)/g, '<a href="$1">$1</a>'));
|
32 |
|
|
|
76 |
});
|
77 |
|
78 |
// Initial message
|
79 |
+
displayMessage('Learn about <a href="https://makerlab.illinois.edu/" target="_blank">Makerlab</a>', false, true);
|
80 |
|
81 |
// Function to minimize the widget
|
82 |
function minimizeWidget() {
|