emile 9 months ago
parent 73e1eb7a0a
commit ca8bbe1429

Binary file not shown.

@ -58,10 +58,10 @@ function openConversation(chatId) {
function appendTextAreaScript(domain, conversationContainer) {
// Check if the script is already appended
if (!document.querySelector('script[src="http://' + domain + '/static/js/osichat-admin/textarea.js"]')) {
if (!document.querySelector('script[src="https://' + domain + '/static/js/osichat-admin/textarea.js"]')) {
const textareaScript = document.createElement('script');
textareaScript.type = 'text/javascript';
textareaScript.src = `http://${domain}/static/js/osichat-admin/textarea.js`;
textareaScript.src = `https://${domain}/static/js/osichat-admin/textarea.js`;
conversationContainer.appendChild(textareaScript);
}
}

@ -49,7 +49,7 @@ function hideLoader() {
function appendTextAreaScript(domain, chatDiv) {
const textareaScript = document.createElement('script');
textareaScript.type = 'text/javascript';
textareaScript.src = `http://${domain}/static/js/osichat/textarea.js`;
textareaScript.src = `https://${domain}/static/js/osichat/textarea.js`;
chatDiv.appendChild(textareaScript);
}
@ -91,10 +91,10 @@ function handleLoadChatEvent(data, osichatSocket) {
}
if (!document.querySelector('script[src="http://' + domain + '/static/js/osichat/chat-toggle.js"]')) {
if (!document.querySelector('script[src="https://' + domain + '/static/js/osichat/chat-toggle.js"]')) {
const script = document.createElement('script');
script.type = 'text/javascript';
script.src = `http://${domain}/static/js/osichat/chat-toggle.js`;
script.src = `https://${domain}/static/js/osichat/chat-toggle.js`;
chatDiv.appendChild(script);
}
@ -110,12 +110,12 @@ function handleLoadChatEvent(data, osichatSocket) {
const uploadScript = document.createElement('script');
uploadScript.type = 'text/javascript';
uploadScript.src = `http://${domain}/static/js/osichat/upload-file.js`;
uploadScript.src = `https://${domain}/static/js/osichat/upload-file.js`;
chatDiv.appendChild(uploadScript);
const endChatScript = document.createElement('script');
endChatScript.type = 'text/javascript';
endChatScript.src = `http://${domain}/static/js/osichat/end-chat.js`;
endChatScript.src = `https://${domain}/static/js/osichat/end-chat.js`;
chatDiv.appendChild(endChatScript);
const endChatButton = document.getElementById('endChat');
@ -126,7 +126,7 @@ function handleLoadChatEvent(data, osichatSocket) {
if (sendReviewContainer) {
const sendReviewScript = document.createElement('script');
sendReviewScript.type = 'text/javascript';
sendReviewScript.src = `http://${domain}/static/js/osichat/send-review.js`;
sendReviewScript.src = `https://${domain}/static/js/osichat/send-review.js`;
chatDiv.appendChild(sendReviewScript);
}
}
@ -202,7 +202,7 @@ async function initializeChatWebSocket() {
unreadMessages.classList.remove('hidden');
unreadMessages.innerHTML = data.html;
const script = document.createElement('script');
script.src = `http://${domain}/static/js/osichat/chat-toggle.js`;
script.src = `https://${domain}/static/js/osichat/chat-toggle.js`;
document.body.appendChild(script);
} else {
unreadMessages.classList.add('hidden');
@ -218,7 +218,7 @@ async function initializeChatWebSocket() {
document.getElementById(`endChat`).classList.add('hidden');
const sendReviewScript = document.createElement('script');
sendReviewScript.type = 'text/javascript';
sendReviewScript.src = `http://${domain}/static/js/osichat/send-review.js`;
sendReviewScript.src = `https://${domain}/static/js/osichat/send-review.js`;
currentChat.appendChild(sendReviewScript);
break;
case 'submit_review':
@ -228,7 +228,7 @@ async function initializeChatWebSocket() {
}
const reviewScript = document.createElement('script');
reviewScript.type = 'text/javascript';
reviewScript.src = `http://${domain}/static/js/osichat/send-review.js`;
reviewScript.src = `https://${domain}/static/js/osichat/send-review.js`;
submitReview.appendChild(reviewScript);
break;
default:

Loading…
Cancel
Save