Skip to content

Commit e033fdb

Browse files
committed
Issue #32: Added copy button to all code snippets
Signed-off-by: alexmerlin <alex.merlin.1985@gmail.com>
1 parent 5c431ec commit e033fdb

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)