diff --git a/_includes/css/nerd-font-tweaks.scss b/_includes/css/nerd-font-tweaks.scss index d1e54f1cd..0e18a4d6a 100644 --- a/_includes/css/nerd-font-tweaks.scss +++ b/_includes/css/nerd-font-tweaks.scss @@ -150,6 +150,11 @@ a.nerd-font-button:before { border-color: #0fbfcf; } +#main .nerd-font-cheat-sheet .column .codepoint:hover { + background: #767260; + text-decoration: underline; +} + #main .nerd-font-cheat-sheet .column:hover .class-name { color: #0fbfcf; } diff --git a/site.js b/site.js index aac757973..135036940 100644 --- a/site.js +++ b/site.js @@ -318,8 +318,6 @@ document.addEventListener('DOMContentLoaded', function () { if (parent.className === 'glyph-popout-copy-clipboard') { if (target.className === 'copy-class') { textToCopy = parent.parentNode.querySelector('.class-name').innerText; - } else if (target.className === 'copy-hex') { - textToCopy = parent.parentNode.querySelector('.codepoint').innerText; } else if (target.className === 'copy-glyph') { textToCopy = window .getComputedStyle(document.querySelector(`.${parent.parentNode.querySelector('.class-name').innerText}`), ':before') @@ -340,6 +338,10 @@ document.addEventListener('DOMContentLoaded', function () { textToCopy += glyph.charCodeAt(i++).toString(16); } } + } else if (parent.className.startsWith('column') && target.className === 'codepoint') { + textToCopy = parent.parentNode.querySelector('.codepoint').innerText; + } + if (textToCopy.length > 0) { gtag('event', event.target.className, { event_category: 'clipboard-copy', event_label: 'Copy To Clipboard : ' + textToCopy,