mirror of
https://github.com/Mabbs/mabbs.github.io
synced 2025-12-20 04:25:35 +01:00
Update 5 files
- /_config.yml - /assets/css/style.scss - /assets/js/main.js - /_layouts/default.html - /_layouts/post.html
This commit is contained in:
parent
8211f6d1a2
commit
9f2bed804e
5 changed files with 24 additions and 4 deletions
|
|
@ -88,7 +88,7 @@ codeBlocks.forEach(function (codeBlock) {
|
|||
codeBlock.append(copyButton);
|
||||
|
||||
copyButton.addEventListener('click', function () {
|
||||
var code = codeBlock.querySelector('pre code').innerText.trim();
|
||||
var code = codeBlock.querySelector('.rouge-code pre').innerText.trim();
|
||||
window.navigator.clipboard.writeText(code)
|
||||
.then(() => {
|
||||
copyButton.innerText = '✅';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue