<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JS Tester</title><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.9/codemirror.min.css"><style>
hr {border: 1px solid #ffcc00;}body {font-family: Arial, sans-serif; margin: 0; padding: 0; background-image: url('https://i.postimg.cc/Xqn4TbVJ/20241205-062907.jpg'); background-size: cover; background-repeat: no-repeat; background-attachment: fixed; background-position: center; color: #ffcc00;}button {display: inline-block; margin: 10px 10px 10px 0;}#container {max-width: 800px; margin: 50px auto; padding: 20px; background: rgba(0,0,0,0.1); width: 90%; backdrop-filter: blur(50px); box-shadow: 0 4px 300px rgba(0, 0, 0, 1); border-radius: 8px; border: 1px solid #ffcc00;}#header {text-align: center; margin-bottom: 20px;}#header h1 {margin: 0; font-size: 24px; color: #ffcc00;}#header p {font-size: 12px; color: #ffcc00;}#codeEditor {height: 300px; border: 1px solid #ffcc00; border-radius: 4px; color: #ffcc00; background: rgba(0,0,0,0.1); backdrop-filter: blur(500px);}button {display: block; margin: 10px 0; padding: 10px 20px; font-size: 16px; cursor: pointer; background-color: #ffcc00; color: #000; border: none; border-radius: 4px; transition: background-color 0.3s;}button:hover {background-color: #ff9900;}#output {margin-top: 20px; padding: 10px; border: 1px solid #ffcc00; background-color: #111; font-family: monospace; white-space: pre-wrap; border-radius: 4px; color: #ffcc00;}#modal, #modalOverlay {display: none;}#modal {position: fixed; top: 50%; left: 50%; transform: translate(-50%, -70%); backdrop-filter: blur(15px); border: 1px solid #ffcc00; background: rgba(0, 0, 0, 0.1); margin: 5% auto; box-shadow: 0 4px 182px #000; padding: 20px; z-index: 1900; border-radius: 2px; width: 300px; text-align: center; color: #ffcc00;}#modalOverlay {position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.1); z-index: 999;}#modalInput {width: 70%; padding: 10px; margin: 10px 0; font-size: 16px; color: #ffcc00; background-color: #111; border: 1px solid #ffcc00;}#modalButtons {display: flex; justify-content: space-between;}.modalButton {padding: 10px 20px; flex: 1; background: none; border: 1px solid #ffcc00; color: #ffcc00; border-radius: 4px; margin: 0 10px;}.cm-s-LightFlow.CodeMirror {background: rgba(0,0,0,0.7); backdrop-filter: blur(150px); color: #ffcc00;}.cm-s-LightFlow .CodeMirror-linenumber {color: #ffcc00;}.CodeMirror-gutters {width: 30px; background: #000; border-right: 1px solid #ffcc00; color: #ffcc00;}.cm-s-LightFlow {background: rgba(0,0,0,0.1); backdrop-filter: blur(500px); color: #dcdcdc;}.cm-s-LightFlow .cm-keyword {color: #ffcc00; font-weight: bold;}.cm-s-LightFlow .cm-atom {color: #66ccff;}.cm-s-LightFlow .cm-number {color: #66ff66;}.cm-s-LightFlow .cm-string {color: #ff7f00;}.cm-s-LightFlow .cm-variable {color: #d291ff;}.cm-s-LightFlow .cm-variable-2 {color: #66ff66; font-weight: bold;}.cm-s-LightFlow .cm-def {color: #00ffff;}.cm-s-LightFlow .cm-operator {color: #ff3399;}.cm-s-LightFlow .cm-builtin {color: #1e90ff; font-style: italic;}.cm-s-LightFlow .cm-tag,.cm-s-LightFlow .cm-attribute {color: #ff6347;}.cm-s-LightFlow .cm-meta {color: #ffff66;}.cm-s-LightFlow .cm-qualifier {color: #dcdcdc;}.cm-s-LightFlow .cm-comment {color: #006400; font-style: italic;}.cm-s-LightFlow .cm-paren {color: #ffcc00 !important;}.cm-s-LightFlow .cm-bracket,.cm-s-LightFlow .cm-curly {color: #ffcc00 !important;}.cm-s-LightFlow .cm-squarebracket {color: #ffcc00 !important;}.cm-s-LightFlow .cm-punctuation {color: #ffcc00 !important;}.cm-s-LightFlow .cm-error {color: #ff0000; text-decoration: underline;}.footer-links {list-style: none; padding: 0; margin: 0; text-align: center;}.footer-links li {display: inline-block; margin: 0 15px;}.footer-links a {color: #ffcc00; text-decoration: none; font-size: 18px; font-weight: bold; padding: 5px 10px; transition: all 0.3s ease;}.footer-links a:hover {color: #fff; background-color: #ffcc00; border-radius: 5px;}.footer-links a:active {color: #ff6600;}#settingsButton {display: inline-block; padding: 10px 20px; font-size: 16px; cursor: pointer; background-color: #000A00; color: #000; border: none; border-radius: 4px; transition: background-color 0.3s;}#settingsButton:hover {background-color: #ff9900;}#settingsModal, #modalOverlay {display: none;}#settingsModal {position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); border: 1px solid #ffcc00; backdrop-filter: blur(50px); background: rgba(0, 0, 0, 0.1); margin: 5% auto; box-shadow: 0 4px 182px #000; padding: 20px; z-index: 1900; border-radius: 2px; width: 300px; text-align: center; color: #ffcc00;}.settings-content {text-align: left; padding: 10px; margin-top: 20px;}.settings-content label {font-size: 14px; margin-right: 10px;}.settings-content input {padding: 5px; margin: 5px 0; width: 100%; border: 1px solid #ffcc00; background-color: #111; color: #ffcc00;}.settings-content button {background-color: #ff9900; margin-top: 10px; width: 100%; padding: 10px; border: none; color: white; cursor: pointer; border-radius: 4px;}.settings-content button:hover {background-color: #ff6600;}.switch {display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding: 10px; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(10px); border: 1px solid #ffcc00; border-radius: 8px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);}.switch input {width: 40px; height: 20px; appearance: none; background: rgba(46, 52, 64, 0.85); border: 1px solid #ffcc00; border-radius: 20px; cursor: pointer; position: relative; outline: none; transition: background 0.3s ease;}.switch input::before {content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #ffcc00; border-radius: 50%; transition: transform 0.3s ease;}.switch input:checked {background: #ffcc00;}.switch input:checked::before {transform: translateX(20px); background: #000;}.selector {margin-bottom: 15px; padding: 10px; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(10px); border: 1px solid #ffcc00; border-radius: 8px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);}.selector select {width: 100%; padding: 10px; background: rgba(46, 52, 64, 0.85); border: 1px solid #ffcc00; border-radius: 5px; color: #ffcc00; font-size: 16px; cursor: pointer; outline: none; box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8); transition: border-color 0.3s ease, box-shadow 0.3s ease;}.selector select:hover {border-color: #fff;}.selector select:focus {box-shadow: 0 0 8px #ffcc00; border-color: #ffcc00;}.floating-suggestion {position: absolute; background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(5px); border: 1px solid #ffcc00; border-radius: 4px; box-shadow: 0 4px 8px rgba(200, 200, 200, 0.3); padding: 5px; z-index: 99000; display: none; max-width: 300px; font-family: Arial, sans-serif; font-size: 12px;}.suggestion-item {padding: 5px; cursor: pointer;}.suggestion-item:hover {background: #ccc;}
</style>
</head><body><div id="container"><div id="header"><h1>© JS Tester</h1><p>v00.00.10 Demo</p></div><hr><textarea id="codeEditor"></textarea><div id="suggestion-box" class="floating-suggestion"></div><button onclick="runCode()">Run</button><button id="settingsButton" onclick="openSettingsModal()">⚙️</button><div id="settingsModal"><h2 style="position: relative;">Settings<span id="closeSM" style="position: absolute;top: 0; right: 10px;font-size: 24px; cursor: pointer;">×</span></h2><hr><div class="settings-content" id="settingsContent"></div></div><div id="output"></div><div id="modalOverlay"></div><div id="modal"><p id="modalText"></p><input type="text" id="modalInput"/><div id="modalButtons"><button class="modalButton" onclick="submitModal()">OK</button><button class="modalButton" onclick="cancelModal()">Cancel</button></div></div></div><footer class="footer"><div class="footer-container">© Not Made by a Human — JS Tester<hr><ul class="footer-links"><li><a href="#comunidade">Help</a></li><li><a href="#suporte">Support</a></li><li><a href="#site">Site</a></li></ul></div></footer><script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.9/codemirror.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.9/mode/javascript/javascript.min.js"></script><script>
const modalOverlay=document.getElementById("modalOverlay"),modal=document.getElementById("modal"),modalText=document.getElementById("modalText"),modalInput=document.getElementById("modalInput"),outputDiv=document.getElementById("output");let resolveModal,rejectModal;function customPrompt(text){return new Promise((resolve,reject)=>{modalText.textContent=text,modalInput.value="",modalOverlay.style.display="block",modal.style.display="block",resolveModal=resolve,rejectModal=reject})}function submitModal(){const value=modalInput.value;closeModal(),resolveModal(value)}function cancelModal(){closeModal(),rejectModal()}function closeModal(){modal.style.display="none",modalOverlay.style.display="none"}const editor=CodeMirror.fromTextArea(document.getElementById("codeEditor"),{lineNumbers:true,mode:"javascript",theme:"LightFlow",tabSize:2,lineWrapping:true,autoCloseBrackets:true,indentWithTabs:true,indentUnit:4,smartIndent:true});console.log=function(...args){args.forEach(arg=>outputDiv.textContent+=`${arg}\n`)};async function runCode(){outputDiv.textContent="";try{const codeInput=editor.getValue(),asyncCode=`(async (prompt) => { ${codeInput} })`,userFunction=eval(asyncCode);await userFunction(customPrompt)}catch(error){console.log(`Error: ${error.message}`)}}const suggestionBox=document.getElementById("suggestion-box"),customWords=["prompt","alert","confirm","console.log","console.error","console.warn","console.info","console.debug","console.clear","document.getElementById","document.querySelector","document.querySelectorAll","document.createElement","document.createTextNode","document.appendChild","document.removeChild","document.replaceChild","document.getElementsByClassName","document.getElementsByTagName","document.body","document.head","window.addEventListener","window.removeEventListener","window.setTimeout","window.setInterval","window.clearTimeout","window.clearInterval","window.localStorage","window.sessionStorage","window.location","window.history","window.alert","window.confirm","window.prompt","window.open","window.close","window.scrollTo","window.scrollBy","window.screen","window.navigator","window.innerWidth","window.innerHeight","window.outerWidth","window.outerHeight","JSON.parse","JSON.stringify","Math.random","Math.floor","Math.ceil","Math.round","Math.abs","Math.max","Math.min","Math.sqrt","Math.pow","Math.sin","Math.cos","Math.tan","Math.log","Math.exp","Math.PI","Math.E","Date","Date.now","Array","Array.isArray","Array.prototype.push","Array.prototype.pop","Array.prototype.shift","Array.prototype.unshift","Array.prototype.slice","Array.prototype.splice","Array.prototype.forEach","Array.prototype.map","Array.prototype.filter","Array.prototype.reduce","Array.prototype.find","Array.prototype.indexOf","Array.prototype.includes","Array.prototype.concat","String","String.prototype.charAt","String.prototype.charCodeAt","String.prototype.concat","String.prototype.includes","String.prototype.indexOf","String.prototype.lastIndexOf","String.prototype.match","String.prototype.replace","String.prototype.search","String.prototype.split","String.prototype.substring","String.prototype.toLowerCase","String.prototype.toUpperCase","String.prototype.trim","String.prototype.startsWith","String.prototype.endsWith","Object","Object.keys","Object.values","Object.entries","Object.assign","Object.create","Object.freeze","Object.seal","Object.defineProperty","Object.defineProperties","Object.getPrototypeOf","Object.setPrototypeOf","Object.is","Object.hasOwnProperty","Object.toString","Number","Number.isFinite","Number.isInteger","Number.isNaN","Number.parseFloat","Number.parseInt","Boolean","RegExp","RegExp.prototype.test","RegExp.prototype.exec","RegExp.prototype.match","RegExp.prototype.replace","setTimeout","setInterval","clearTimeout","clearInterval","fetch","XMLHttpRequest","Promise","Promise.resolve","Promise.reject","Promise.all","Promise.race","async","await","try","catch","finally","throw","class","constructor","extends","super","static","function","return","if","else","switch","case","break","continue","for","forEach","while","do","let","const","var","import","export","default","null","undefined","NaN","Infinity"];function showSuggestions(word,coords){const suggestions=customWords.filter(item=>item.includes(word));if(suggestions.length===0||word.trim()===''){suggestionBox.style.display='none';return}suggestionBox.innerHTML=suggestions.map(item=>`<div class="suggestion-item">${item}</div>`).join('');suggestionBox.style.left=coords.left+'px';suggestionBox.style.top=coords.top+'px';suggestionBox.style.display='block'}function insertSuggestion(suggestion){const cursor=editor.getCursor(),line=editor.getLine(cursor.line),start=line.lastIndexOf(' ',cursor.ch)+1,end=cursor.ch,formattedSuggestion=suggestion+'("")';editor.replaceRange(formattedSuggestion,{line:cursor.line,ch:start},{line:cursor.line,ch:end});const newCursorPos={line:cursor.line,ch:start+suggestion.length+2};editor.setCursor(newCursorPos);suggestionBox.style.display='none'}editor.on('keyup',(cm,event)=>{if(event.key==='Enter'||event.key==='Escape'){suggestionBox.style.display='none';return}const cursor=cm.getCursor(),line=cm.getLine(cursor.line),word=line.substring(0,cursor.ch).split(/[\s();{}]/).pop();if(word.length>0){const coords=editor.charCoords(cursor,'window');showSuggestions(word,coords)}else suggestionBox.style.display='none'});suggestionBox.addEventListener('click',e=>{if(e.target.classList.contains('suggestion-item'))insertSuggestion(e.target.textContent)});document.addEventListener('click',e=>{if(!suggestionBox.contains(e.target)&&e.target!==editor.getInputField())suggestionBox.style.display='none'});
</script><script>
const settingsModal=document.getElementById("settingsModal"),settingsContent=document.getElementById("settingsContent");function openSettingsModal(){const modal=document.getElementById("settingsModal"),overlay=document.getElementById("modalOverlay");modal.style.display="block",overlay.style.display="block",populateSettingsContent()}function populateSettingsContent(){settingsContent.innerHTML='<div><button id="addWindowBtn">Add</button></div>';const addWindowBtn=document.getElementById("addWindowBtn");addWindowBtn?addWindowBtn.onclick=createFloatingWindow:console.error('Elemento com ID "addWindowBtn" não foi encontrado.')}function closeSettingsModal(){const modal=document.getElementById("settingsModal"),overlay=document.getElementById("modalOverlay");modal.style.display="none",overlay.style.display="none"}document.getElementById("settingsButton").onclick=openSettingsModal,document.getElementById("closeSM").onclick=closeSettingsModal;
</script><script>let userDefinedWords=new Set();function updateSuggestions(code){const variablePattern=/\b(?:var|let|const)\s+([a-zA-Z_$][a-zA-Z_$0-9]*)/g;const functionPattern=/\bfunction\s+([a-zA-Z_$][a-zA-Z_$0-9]*)/g;const arrayPattern=/\b([a-zA-Z_$][a-zA-Z_$0-9]*)\s*=\s*.*?/g;let match;while((match=variablePattern.exec(code))!==null){userDefinedWords.add(match[1]);}while((match=functionPattern.exec(code))!==null){userDefinedWords.add(match[1]);}while((match=arrayPattern.exec(code))!==null){userDefinedWords.add(match[1]);}}editor.on("inputRead",(cm,change)=>{const cursor=editor.getCursor();const token=editor.getTokenAt(cursor);const currentWord=token.string;if(currentWord.length>1){const allSuggestions=[...customWords,...Array.from(userDefinedWords)];const filteredSuggestions=allSuggestions.filter(word=>word.startsWith(currentWord));showSuggestions(filteredSuggestions,cursor,token);}else{suggestionBox.style.display="none";}});function showSuggestions(suggestions,cursor,token){if(suggestions.length===0){suggestionBox.style.display="none";return;}const cursorCoords=editor.cursorCoords();suggestionBox.style.left=`${cursorCoords.left}px`;suggestionBox.style.top=`${cursorCoords.bottom}px`;suggestionBox.style.display="block";suggestionBox.innerHTML=suggestions.map(word=>`<div class="suggestion-item">${word}</div>`).join("");document.querySelectorAll(".suggestion-item").forEach(item=>{item.onclick=()=>{editor.replaceRange(item.textContent,{line:cursor.line,ch:token.start},{line:cursor.line,ch:token.end});suggestionBox.style.display="none";};});}editor.on("change",()=>{updateSuggestions(editor.getValue());});</script></body></html>