From 57479e144d008ec0da473a8a4687a03e60d0a8a5 Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Fri, 30 Aug 2024 20:26:10 -0700 Subject: [PATCH] remove unused javascript --- dist/scripts/cat_fact_fetcher.js | 5 ----- dist/scripts/link.js | 16 ---------------- 2 files changed, 21 deletions(-) delete mode 100644 dist/scripts/cat_fact_fetcher.js diff --git a/dist/scripts/cat_fact_fetcher.js b/dist/scripts/cat_fact_fetcher.js deleted file mode 100644 index da657f1..0000000 --- a/dist/scripts/cat_fact_fetcher.js +++ /dev/null @@ -1,5 +0,0 @@ -fetch("https://catfact.ninja/fact") - .then(data => data.json()) - .then(data => { - document.getElementById("cat-fact").innerHTML = data.fact; - }); diff --git a/dist/scripts/link.js b/dist/scripts/link.js index 17a8e5e..ad6f63a 100644 --- a/dist/scripts/link.js +++ b/dist/scripts/link.js @@ -1,19 +1,3 @@ -document.addEventListener("DOMContentLoaded", () => { - const params = new Proxy(new URLSearchParams(window.location.search), { - get: (searchParams, prop) => searchParams.get(prop), - }); - - - if (params.link !== null) { - let link = `${window.location.origin}/download/${params.link}`; - - let link_el = document.getElementById("link"); - - link_el.href = link; - link_el.innerHTML = link; - } -}); - function clipboard() { let copyText = document.getElementById("link");