diff options
author | axtloss <axtlos@disroot.org> | 2024-08-20 13:36:20 +0200 |
---|---|---|
committer | axtloss <axtlos@disroot.org> | 2024-08-20 13:36:20 +0200 |
commit | 5c989397023a3d290ebb9ea390401a5ca433ccd3 (patch) | |
tree | 8fc7cf5373041ba8fd1efee6dc3c6f6dcfb63c4b | |
parent | 70c61071abed9f08f0a0c2aff84cc08ef37b0d9f (diff) | |
download | website-5c989397023a3d290ebb9ea390401a5ca433ccd3.tar.gz website-5c989397023a3d290ebb9ea390401a5ca433ccd3.tar.bz2 |
fix copy
-rw-r--r-- | src/app.html | 6 | ||||
-rw-r--r-- | src/routes/+page.svelte | 15 | ||||
-rw-r--r-- | static/antibrave.js | 1 |
3 files changed, 8 insertions, 14 deletions
diff --git a/src/app.html b/src/app.html index 3f56455..5862a66 100644 --- a/src/app.html +++ b/src/app.html @@ -1,11 +1,5 @@ <!doctype html> <html lang="en"> - <script> - var isBrave = (navigator.brave && await navigator.brave.isBrave()) || false; - if (isBrave) { - window.location.href = '/not-very-brave.html'; - } - </script> <head> <meta charset="utf-8" /> <link rel="icon" href="%sveltekit.assets%/favicon.gif" /> 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> diff --git a/static/antibrave.js b/static/antibrave.js new file mode 100644 index 0000000..99d679c --- /dev/null +++ b/static/antibrave.js @@ -0,0 +1 @@ +!async function(){if(navigator.brave&&await navigator.brave.isBrave()||!1){window.location.href="https://axtlos.blahaj.land/not-very-brave.html"}}; |