mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-22 02:21:37 +01:00
Use innerHTML instead of innerText in Code Copy strings
so that users willing to use a svg inplace of already existing text can update the i18n strings and get an svg in place
This commit is contained in:
parent
cf5b2d59b2
commit
b7dbb0ea0e
@ -91,12 +91,12 @@
|
|||||||
|
|
||||||
const copybutton = document.createElement('button');
|
const copybutton = document.createElement('button');
|
||||||
copybutton.classList.add('copy-code');
|
copybutton.classList.add('copy-code');
|
||||||
copybutton.innerText = '{{- i18n "code_copy" | default "copy" }}';
|
copybutton.innerHTML = '{{- i18n "code_copy" | default "copy" }}';
|
||||||
|
|
||||||
function copyingDone() {
|
function copyingDone() {
|
||||||
copybutton.innerText = '{{- i18n "code_copied" | default "copied!" }}';
|
copybutton.innerHTML = '{{- i18n "code_copied" | default "copied!" }}';
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
copybutton.innerText = '{{- i18n "code_copy" | default "copy" }}';
|
copybutton.innerHTML = '{{- i18n "code_copy" | default "copy" }}';
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user