mirror of
https://github.com/MathMan05/Fermi.git
synced 2026-10-29 22:22:27 +00:00
copy code
This commit is contained in:
3 files changed
+13
No files matched your search
@@ -374,6 +374,15 @@ class MarkDown {
|
||||
pre.textContent = build;
|
||||
span.appendChild(pre);
|
||||
if (count === 3) highlight(pre, lang, keep ? 3 + lang.length : 0, keep ? 3 : 0);
|
||||
if (!keep && !stdsize && lang && count === 3) {
|
||||
const button = document.createElement("button");
|
||||
button.textContent = I18n.copyCode();
|
||||
button.classList.add("copyCode");
|
||||
pre.append(button);
|
||||
button.onclick = () => {
|
||||
navigator.clipboard.writeText(build);
|
||||
};
|
||||
}
|
||||
}
|
||||
i--;
|
||||
continue;
|
||||
|
||||
@@ -731,6 +731,9 @@ audio::-webkit-media-controls-panel {
|
||||
background: #00000050;
|
||||
}
|
||||
}
|
||||
.copyCode {
|
||||
margin-top: 12px;
|
||||
}
|
||||
button,
|
||||
input::file-selector-button,
|
||||
select {
|
||||
|
||||
@@ -1035,6 +1035,7 @@
|
||||
"manage": "Manage security keys"
|
||||
},
|
||||
"webhook": "WEBHOOK",
|
||||
"copyCode":"Copy code",
|
||||
"webhooks": {
|
||||
"EnterWebhookName": "Enter webhook name",
|
||||
"areYouSureDelete": "Are you sure you want to delete $1?",
|
||||
|
||||
Reference in new issue
Block a user