---
src/demo/js/script.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/demo/js/script.js b/src/demo/js/script.js
index 4a8d63ac..4733222b 100644
--- a/src/demo/js/script.js
+++ b/src/demo/js/script.js
@@ -58,11 +58,11 @@ const preview = {
.then((data) => (document.querySelector(".output .json pre").innerText = JSON.stringify(data, null, 2)))
.catch(console.error);
document.querySelector(".json code").innerText = imageURL;
- document.querySelector(".copy-md").style.display = "none";
- document.querySelector(".copy-html").style.display = "none";
+ document.querySelector(".copy-md").parentElement.style.display = "none";
+ document.querySelector(".copy-html").parentElement.style.display = "none";
document.querySelector(".output img").style.display = "none";
document.querySelector(".output .json").style.display = "block";
- document.querySelector(".copy-json").style.display = "block";
+ document.querySelector(".copy-json").parentElement.style.display = "block";
}
// disable copy button if username is invalid
const copyButtons = document.querySelectorAll(".copy-button");
From 94b53055346766d3b8e456b54bb5b130c201cebd Mon Sep 17 00:00:00 2001
From: Adam Ross <14985050+R055A@users.noreply.github.com>
Date: Wed, 4 Oct 2023 13:41:25 +0200
Subject: [PATCH 5/5] Fix demo clipboard copy to json
---
src/demo/js/script.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/demo/js/script.js b/src/demo/js/script.js
index 4733222b..00044a79 100644
--- a/src/demo/js/script.js
+++ b/src/demo/js/script.js
@@ -393,6 +393,8 @@ const clipboard = {
input.value = document.querySelector(".md code").innerText;
} else if (el.classList.contains("copy-html")) {
input.value = document.querySelector(".html code").innerText;
+ } else if (el.classList.contains("copy-json")) {
+ input.value = document.querySelector(".json code").innerText;
}
document.body.appendChild(input);
// select all
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy