From 2fc795f97c96517a4ca71921709c3f4b734e7818 Mon Sep 17 00:00:00 2001 From: Ryan Tusi Date: Mon, 20 Nov 2023 21:53:57 +0530 Subject: [PATCH] Fully Functional --- src/script.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/script.js b/src/script.js index 7229295..c7c1690 100644 --- a/src/script.js +++ b/src/script.js @@ -1,8 +1,11 @@ const generated_file = document.getElementById("file"); const copy = document.getElementById("copy"); +const text = document.getElementById("file"); + document.addEventListener('DOMContentLoaded', function () { generated_file.style.display = "none"; - copy.style.display = "none"; + copy.style.display = "none" + text.innerHTML = ""; }); const programming = [ @@ -653,8 +656,6 @@ const generate = document.getElementById("generate"); generate.addEventListener('click', generate_README); const copyText = () => { - const text = document.getElementById("file"); - text.select(); text.setSelectionRange(0, 99999);