Update button style + add feedback on click
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
parent
a024839adf
commit
562c783a27
4 changed files with 52 additions and 15 deletions
|
@ -2,9 +2,9 @@ addCopyButtons(navigator.clipboard)
|
|||
|
||||
function addCopyButtons(clipboard) {
|
||||
document.querySelectorAll('pre > code').forEach(function (codeBlock) {
|
||||
const button = document.createElement('a')
|
||||
const button = document.createElement('button')
|
||||
button.title = "Copy"
|
||||
button.className = 'copy-code-button'
|
||||
button.className = 'copy-code-button btn btn-sm'
|
||||
button.innerHTML = "<i class='fa-regular fa-copy'></i>"
|
||||
|
||||
button.addEventListener('click', function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue