Skip to content

Commit

Permalink
removed unnecessary highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaki-1052 committed Feb 9, 2024
1 parent 454a26d commit 73aced5
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions public/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ let currentModelID = 'gpt-4'; // Global declaration
let selectedImage = null;

// Convert markdown to HTML using marked.js and sanitize it with DOMPurify
marked.setOptions({ breaks: true }); // Enable new lines to be interpreted as <br>
marked.setOptions({ breaks: true }); // Enable new lines to be interpreted as <br>

// Function to select a model and update the displayed text

// Function to select a model and update the displayed text
// Global variable to store the current model ID

// Function to update the current model ID
Expand Down Expand Up @@ -749,14 +749,14 @@ function displayMessage(message, type) {

// copy button feature

function copyToClipboard(messageText) {
navigator.clipboard.writeText(messageText.textContent).then(() => {
// Confirmation
console.log('Response copied to clipboard!');
}).catch(err => {
console.error('Error copying text: ', err);
});
}
// Updated copyToClipboard function to handle text parameter
function copyToClipboard(text) {
navigator.clipboard.writeText(text).then(() => {
console.log('Text copied to clipboard!');
}).catch(err => {
console.error('Error copying text: ', err);
});
}


});
Expand Down

0 comments on commit 73aced5

Please sign in to comment.