User:Srinibha23/hello.js

// Create the modal container var modalContainer = document.createElement('div'); modalContainer.setAttribute('id', 'chatbotModal'); modalContainer.setAttribute('class', 'modal');

// Create the modal content var modalContent = document.createElement('div'); modalContent.setAttribute('class', 'modal-content');

// Create the input field and text area var userInput = document.createElement("input"); userInput.setAttribute("id", "userInput"); userInput.setAttribute("class","vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box");

var responseArea = document.createElement("textarea"); responseArea.setAttribute("id", "responseArea");

// Append the input field and text area to the modal content modalContent.appendChild(userInput); modalContent.appendChild(responseArea);

// Append the modal content to the modal container modalContainer.appendChild(modalContent);

// Append the modal container to the document body document.body.appendChild(modalContainer);

// Find the AI Chatbot Assistance section var aiChatbotSection = document.querySelector('.mw-ge-help-panel-home-button-general-help');

// Attach a click event listener to the AI Chatbot section aiChatbotSection.addEventListener('click', function {   // Show the modal    modalContainer.style.display = 'block'; });

// Close the modal when the user clicks outside of it window.addEventListener('click', function(event) {   if (event.target == modalContainer) {        modalContainer.style.display = 'none';    } });