1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2026-05-07 17:28:39 +00:00

Prevent copying code line numbers on Safari

This commit is contained in:
Cotes Chung
2021-09-16 18:42:50 +08:00
parent 1b16b152df
commit 4001ef7cba
3 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -35,7 +35,8 @@ $(function() {
// Initial the clipboard.js object
const clipboard = new ClipboardJS(btnSelector, {
target(trigger) {
return trigger.parentNode.nextElementSibling;
let codeBlock = trigger.parentNode.nextElementSibling;
return codeBlock.querySelector('code .rouge-code');
}
});
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long