createNewItem(`Draw`, `Draw`, `
let autoWin = openWindow(1000, 500, 'dino game', false, 'https://play-lh.googleusercontent.com/i-0HlK6I-K5ZVI28HFa4iXz0T22Mg2WjQ4gMsEYvqmSNdifp2NE41ZiaUCavmbIimQ=w240-h480-rw');
autoWin.style.backgroundColor = 'gray';
let iframe = newElement('iframe', autoWin, "autoObj");
iframe.src = "javascript: (() => { let canvas = document.createElement('canvas'); document.body.appendChild(canvas); canvas.style.position = 'absolute'; canvas.style.top = 0; canvas.style.left = 0; canvas.height = window.innerHeight; canvas.width = window.innerWidth; let ctx = canvas.getContext('2d'); let colorInput = document.createElement('input'); colorInput.type = 'color'; colorInput.onchange = function(){ color = colorInput.value; }; colorInput.value = 'black'; document.body.appendChild(colorInput); let eraserOn = false; let eraserBtn = document.createElement('button'); eraserBtn.onclick = function(){ eraserOn = !eraserOn; }; eraserBtn.innerText = 'Eraser'; document.body.appendChild(eraserBtn); let sizeInput = document.createElement('input'); sizeInput.type = 'range'; sizeInput.min = '1'; sizeInput.max = '20'; sizeInput.onchange = function(){ size = sizeInput.value; }; sizeInput.value = '10'; document.body.appendChild(sizeInput); let size = 10; let draw = false; let color = 'black'; window.onmousedown = function(e){ draw = true; }; window.onmouseup = function(){ draw = false; }; window.onmousemove = function(e){ if (draw === true) { if (eraserOn === true) { ctx.fillStyle = 'white'; } else { ctx.fillStyle = color; } ctx.lineJoin = 'round'; ctx.lineCap = 'round'; ctx.lineWidth = size; ctx.strokeStyle = color; ctx.beginPath(); ctx.moveTo(lastX, lastY); ctx.lineTo(e.clientX, e.clientY); ctx.stroke(); ctx.closePath(); } lastX = e.clientX; lastY = e.clientY; }; let lastX; let lastY; })();";
iframe.style.width = '100%';
iframe.style.height = '100%';`, Injector.user.icons.Draw);