Skip to content

Commit

Permalink
Merge pull request ppoffice#99 from heruns/dev
Browse files Browse the repository at this point in the history
chore(plugin): add hover style for copy button & clear selection after copy
  • Loading branch information
ppoffice committed May 6, 2019
2 parents 7185784 + 32a964d commit d94399b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions layout/plugins/clipboard.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
color: #9a9a9a;
background: none;
border: none;
cursor: pointer;
}
.hljs .clipboard-btn:hover {
color: #8a8a8a;
}
.hljs > .clipboard-btn {
Expand Down Expand Up @@ -51,6 +56,9 @@
return document.getElementById(trigger.getAttribute('data-clipboard-target-id'));
}
});
clipboard.on('success', function(e) {
e.clearSelection();
})
})
</script>
<% } %>

0 comments on commit d94399b

Please sign in to comment.