mirror of
https://gitee.com/butubb8/blowfish.git
synced 2025-12-05 14:17:50 +08:00
🐛 Code copy doesn't work with gist
This commit is contained in:
@@ -13,7 +13,7 @@ function createCopyButton(highlightDiv) {
|
||||
}
|
||||
|
||||
async function copyCodeToClipboard(button, highlightDiv) {
|
||||
const codeToCopy = highlightDiv.querySelector(":last-child > .chroma > code").innerText;
|
||||
const codeToCopy = highlightDiv.querySelector(":last-child").innerText;
|
||||
try {
|
||||
result = await navigator.permissions.query({ name: "clipboard-write" });
|
||||
if (result.state == "granted" || result.state == "prompt") {
|
||||
|
||||
Reference in New Issue
Block a user