Skip to content

Commit f46fb48

Browse files
authored
Merge pull request #33 from dotkernel/issue-32
Issue #32: Added `copy` button to all code snippets
2 parents 5c431ec + e033fdb commit f46fb48

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

js/docs.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,9 @@ function copy(text){
1313
} catch (error){}
1414
}
1515
}
16+
17+
$(function() {
18+
$('pre.highlight').each(function() {
19+
$(this).prepend('<i class="bi bi-copy copy_btn" title="Copy code" onclick="copy(this)"></i>');
20+
});
21+
});

0 commit comments

Comments
 (0)