gpt-3.5-turbo-1106· OpenAI
Arena Human Preference 55K
Js code for replacing some words in whatsapp web
- User
Js code for replacing some words in whatsapp web
- Assistant
To replace words in a WhatsApp web chat using JavaScript, you can use the following code. Make sure you open the console in your browser and paste the code there while being on the WhatsApp web page:
// Replace words in the chat function replaceWordsInChat() { const chatMessages = document.querySelectorAll('.message-in, .message-out'); // Get all chat messages chatMessages.forEach(message => { const messageText = message.querySelector('.selectable-text').innerText; // Get the message text const replacedText = messageText.replace(/wordToReplace/g, 'replacementWord'); // Replace the word message.querySelector('.selectable-text').innerText = replacedText; // Update the message text }); } // Call the function to replace the words replaceWordsInChat();
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.