Skip to content

Instantly share code, notes, and snippets.

@n8io
Created March 20, 2019 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n8io/9808590d978762c2477d29e11becdab2 to your computer and use it in GitHub Desktop.
Save n8io/9808590d978762c2477d29e11becdab2 to your computer and use it in GitHub Desktop.
Gitmoji cjs
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