From c352987645294838b7ea1eaa3cbcaf0994bf9dd0 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Mon, 22 Jan 2024 10:18:35 +0100 Subject: Sync from main --- append.html | 146 ++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 87 insertions(+), 59 deletions(-) (limited to 'append.html') diff --git a/append.html b/append.html index 51c8e97..20d1afe 100644 --- a/append.html +++ b/append.html @@ -1,74 +1,102 @@
- - - - - + + + + +
-
- -
+
+ +
+ sharePopover.addEventListener("click", (e) => { + sharePopover.style.display = "none"; + }); + + document.querySelector("#twitter").href = + `https://twitter.com/intent/tweet?text=${document.title}%0A${window.location.href}`; + document.querySelector("#mastodon").onclick = (e) => { + window.location.href = `https://${prompt( + "Enter your mastodon instance:", + "mastodon.social", + )}/share?text=${document.title}%0A${window.location.href}`; + e.preventDefault(); + }; + const buttons = document.querySelectorAll(".buttons button"); + for (let i = 0; i < buttons.length; i++) + buttons[i].addEventListener("click", funcs[i]); + + setTimeout(() => { + const links = document.querySelectorAll("a"); + for (let i = 0; i < links.length; i++) { + if (links[i].getAttribute("href") == "mail") { + for (let j = 0; j < 4; j++) text = atob(text); + links[i].href = `mailto:${text}`; + } + } + }, 1000); + })(); + -- cgit v1.2.3