mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-05-29 13:04:06 +00:00
deploy: 841189885d
This commit is contained in:
parent
ac425f509e
commit
321a15971d
1097 changed files with 18776 additions and 18762 deletions
6
js/clipboard.min.js
vendored
6
js/clipboard.min.js
vendored
File diff suppressed because one or more lines are too long
14
js/theme.js
14
js/theme.js
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue