This commit is contained in:
McShelby 2025-01-01 20:58:16 +00:00
parent ac425f509e
commit 321a15971d
1097 changed files with 18776 additions and 18762 deletions

6
js/clipboard.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -688,6 +688,20 @@ function initCodeClipboard() {
pre.parentNode.replaceChild(div, pre);
pre = clone;
}
// we have to make sure, the button is visible while
// Clipboard.js is doing its magic
button.addEventListener('focus', function (ev) {
setTimeout(function () {
ev.target.classList.add('force-display');
}, 0);
});
button.addEventListener('blur', function (ev) {
this.removeAttribute('aria-label');
this.classList.remove('tooltipped', 'tooltipped-w', 'tooltipped-se', 'tooltipped-sw');
setTimeout(function () {
ev.target.classList.remove('force-display');
}, 0);
});
pre.parentNode.insertBefore(button, pre.nextSibling);
} else {
code.dataset.code = text;