Cleanup copy button CSS and add a hover-over explanation.

This commit is contained in:
Rapptz
2020-05-28 01:00:49 -04:00
parent 7607d3628d
commit 2e3b8dc3d1
2 changed files with 3 additions and 9 deletions

View File

@ -21,6 +21,8 @@ document.addEventListener("DOMContentLoaded", () => {
let copyEl = document.createElement("span");
copyEl.addEventListener('click', () => copy(codeblock));
copyEl.className = "copy";
copyEl.setAttribute("aria-label", "Copy Code");
copyEl.setAttribute("title", "Copy Code");
let copyIcon = document.createElement("i");
copyIcon.className = "fas " + COPY;