const developermode = true; // Create a function to handle the menu function toggleMenu() { // Check if developermode is true if (developermode) { // Get the menu container element const container = document.querySelector('.injector-container'); // Toggle the menu state if (container.style.display === 'none') { container.style.display = 'block'; } else { container.style.display = 'none'; } } } // Handle the "Insert" key press event document.addEventListener('keydown', (event) => { if (event.key === 'F2') { toggleMenu(); } }); // Create the container element for the menu const container = document.createElement('div'); container.classList.add('injector-container'); container.style.position = 'fixed'; container.style.top = '50px'; container.style.left = '50px'; container.style.width = '300px'; container.style.backgroundColor = 'white'; container.style.border = '1px solid black'; container.style.zIndex = '9999'; container.style.userSelect = 'none'; // Create the top bar element const topbar = document.createElement('div'); topbar.classList.add('injector-topbar'); topbar.textContent = 'JInject by CyberVortex'; topbar.style.backgroundColor = '#f1f1f1'; topbar.style.padding = '5px'; topbar.style.fontSize = '16px'; // Create the syntax-highlighted multiline text box const textBox = document.createElement('textarea'); textBox.classList.add('injector-textbox'); textBox.spellcheck = false; textBox.style.width = '93%'; textBox.style.height = '175px'; textBox.style.padding = '10px'; textBox.style.fontFamily = 'monospace'; textBox.style.border = 'none'; textBox.style.resize = 'none'; textBox.style.backgroundColor = 'lightgray'; // Create the "Inject" button const button = document.createElement('button'); button.classList.add('injector-button'); button.textContent = 'Run'; button.style.backgroundColor = 'green'; button.style.color = 'white'; button.style.padding = '10px'; button.style.border = 'none'; button.style.cursor = 'pointer'; button.style.width = '100%'; button.style.fontSize = '24px'; // Append the elements to the container container.appendChild(topbar); container.appendChild(textBox); container.appendChild(button); // Append the container to the document body document.body.appendChild(container); // Hide the menu initially container.style.display = 'none'; // Handle the "Inject" button click event button.addEventListener('click', () => { const code = textBox.value; eval(code); });