const canvas = document.getElementById("canvas"); const ctx = canvas.getContext("2d"); canvas.width = innerWidth; canvas.height = innerHeight; drag = false; var radius = document.getElementById("range-input").value; const circleEndPath = Math.PI * 2; ctx.lineCap = "round"; var undo = [], redo = []; const colors = ["#000000", "#1f2652", "#0e113a", "#ee3466", "#c42754", "#00b0ad", "#018790", "#fff79c", "#fed883", "#523b58", "#362337", "#f8c09d", "#ef937e", "#0e3441", "#002337", "#1abfdf", "#0094bc", "#d8df20", "#8ec63f", "#ffffff", "#b4c8d3"]; init(); function init() { var pallete = document.querySelector(".pallete"); var color; for (let i = 0; i < colors.length; i++) { color = document.createElement("span"); color.classList.add("color"); if (i === 0) { color.classList.add("active"); } color.style.background = colors[i]; pallete.append(color); color.addEventListener("click", (e) => { document.querySelectorAll(".color").forEach((el) => { el.classList.remove("active"); }); e.target.classList.add("active"); }); } } function save_state(canvas, list, keep) { undo.push(canvas.toDataURL()); } function ctx_undo(canvas, ctx) { if (undo.length) { var line = undo.pop(); var round = undo.pop(); var img = document.createElement("img"); img.src = line; img.onload = function () { ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.drawImage(img, 0, 0, canvas.width, canvas.height, 0, 0, canvas.width, canvas.height); }; img.src = round; } } function draw(e) { if (drag) { ctx.strokeStyle = ctx.fillStyle = document.querySelector(".color.active").style.background; ctx.lineWidth = radius * 2; ctx.beginPath(); ctx.arc(e.clientX, e.clientY, radius, 0, circleEndPath); ctx.fill(); ctx.beginPath(); ctx.moveTo(e.clientX, e.clientY); save_state(canvas); } } function down(e) { drag = true; save_state(canvas); ctx.beginPath(); draw(e); } function move(e) { if (drag) { ctx.lineTo(e.clientX, e.clientY); ctx.stroke(); } } function stop() { drag = false; } document.getElementById("range-input").addEventListener("change", (e) => { radius = e.target.value; }); document.querySelector(".tabs").addEventListener("click", (e) => { document.querySelectorAll(".tab").forEach((t) => { t.classList.remove("active"); }); e.target.classList.add("active"); var el = document.querySelector("." + e.target.getAttribute("data-tab")); document.querySelector(".tab-content-holder").style.left = "-" + el.offsetLeft + "px"; }); document.querySelector(".undo").addEventListener("click", (el) => { ctx_undo(canvas, ctx); }); document.querySelector(".save_btn").addEventListener("click", function (e) { var a = document.createElement("a") a.href = canvas.toDataURL(); a.download = "img.png"; a.click() }); canvas.addEventListener("mousemove", move); canvas.addEventListener("mouseup", stop); canvas.addEventListener("mousedown", down);





If you would like to buy one of the article services here are the steps to follow:


* Send the price amount to: "1H6AcwSvo8856Dm1s1kJeRqo7utnAvTssi" (Bitcoin wallet address)


* E-mail your proof of transaction and service name to webseosvc@yandex.com


* Wait for 5-10 days to get to be delivered.