mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-10-04 00:36:02 +00:00
Compare commits
1 Commits
renovate/e
...
5cd5a87823
Author | SHA1 | Date | |
---|---|---|---|
|
5cd5a87823 |
@@ -19,9 +19,9 @@ document
|
||||
.forEach((highlightDiv) => createCopyButton(highlightDiv));
|
||||
|
||||
async function copyCodeToClipboard(button, highlightDiv) {
|
||||
const codeToCopy = highlightDiv.querySelector(
|
||||
"pre > code"
|
||||
).innerText;
|
||||
const codeToCopy = highlightDiv
|
||||
.querySelector("pre > code ")
|
||||
.innerText.replace(/\n\n/g, "\n"); // This is needed to fix the double spacing
|
||||
try {
|
||||
var result = await navigator.permissions.query({ name: "clipboard-write" });
|
||||
if (result.state == "granted" || result.state == "prompt") {
|
||||
|
@@ -19,9 +19,9 @@ document
|
||||
.forEach((highlightDiv) => createCopyButton(highlightDiv));
|
||||
|
||||
async function copyCodeToClipboard(button, highlightDiv) {
|
||||
const codeToCopy = highlightDiv.querySelector(
|
||||
"pre > code"
|
||||
).innerText;
|
||||
const codeToCopy = highlightDiv
|
||||
.querySelector("pre > code ")
|
||||
.innerText.replace(/\n\n/g, "\n"); // This is needed to fix the double spacing
|
||||
try {
|
||||
var result = await navigator.permissions.query({ name: "clipboard-write" });
|
||||
if (result.state == "granted" || result.state == "prompt") {
|
||||
|
Reference in New Issue
Block a user