From 5c989397023a3d290ebb9ea390401a5ca433ccd3 Mon Sep 17 00:00:00 2001
From: axtloss <axtlos@disroot.org>
Date: Tue, 20 Aug 2024 13:36:20 +0200
Subject: fix copy

---
 src/routes/+page.svelte | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

(limited to 'src/routes/+page.svelte')

diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index c046cd7..f7fddd5 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -21,7 +21,6 @@
   var matrix: string = "c210213a12713012b1230fc13612a1270ef12313213113612a12712512313413b0f012512e137124"
   onMount(() => {
     if (navigator.webdriver) {
-      document.body.toggleAttribute("data-noscript");
       return;
     }
 
@@ -102,7 +101,7 @@
   </section>
   <section id="contact">
     <h2>Contact</h2>
-    <p class="subheader">Click on an element to copy its address</p>
+    <p class="subheader">Click on a card to copy its address</p>
     <p>
       You can contact me on these platforms!
     </p>
@@ -117,8 +116,8 @@
 	<div
 	  role="button"
 	  tabindex="0"
-	  on:click={isDecoded(matrix) ? undefined : copyText(xmpp)}
-	  on:keydown={isDecoded(matrix) ? undefined : copyText(xmpp)}>
+	  on:click={isDecoded(matrix) ? copyText(xmpp) : undefined}
+	  on:keydown={isDecoded(matrix) ? copyText(xmpp) : undefined}>
 	  <h3>XMPP</h3>
 	  {#if !browser}
 	    <noscript>{xmpp}</noscript>
@@ -131,10 +130,10 @@
 	<div
 	  role="button"
 	  tabindex="0"
-	  on:click={isDecoded(matrix) ? undefined : copyText(matrix)}
-	  on:keydown={isDecoded(matrix) ? undefined : copyText(matrix)}>
+	  on:click={isDecoded(matrix) ? copyText(matrix) : undefined}
+	  on:keydown={isDecoded(matrix) ? copyText(matrix) : undefined}>
 	  <h3>matrix</h3>
-	  {#if !browser}
+ 	  {#if !browser}
 	    <noscript>{matrix}</noscript>
 	  {:else}
 	    <p>{matrix}</p>
@@ -144,7 +143,7 @@
       <li id="email">
 	<div>
 	  <a class="permalink"
-	     href={isDecoded(matrix) ? `javascript:void` : `mailto:${xmpp}`}>
+	     href={isDecoded(matrix) ? `mailto:${xmpp}` :  `javascript:void`}>
 	    <h3>email</h3>
 	    {#if !browser}
 	      <noscript>{xmpp}</noscript>
-- 
cgit v1.2.3

