Created
March 20, 2019 15:39
-
-
Save n8io/9808590d978762c2477d29e11becdab2 to your computer and use it in GitHub Desktop.
Gitmoji cjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const setEmojiCopy = () => { | |
[ | |
...document | |
.querySelectorAll('.emoji-icon.gitmoji') | |
] | |
.forEach(el => | |
el.setAttribute('data-clipboard-text', el.innerText) | |
); | |
}; | |
const applyStyle = () => { | |
const css = ` | |
.emoji-info { | |
padding: 0 0.5rem; | |
word-break: break-all; | |
} | |
.emoji-info code, | |
.footer, | |
.header, | |
.nav.row.middle-xs { | |
display: none; | |
} | |
main.wrap { | |
padding: 0; | |
} | |
.wrap { | |
max-width: 1600px; | |
margin: 0; | |
} | |
.emoji-card { | |
cursor: pointer; | |
} | |
`; | |
const style = document.createElement('style'); | |
style.innerText = css; | |
document.body.appendChild(style); | |
} | |
setEmojiCopy(); | |
applyStyle(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment