Last active
August 29, 2015 14:23
-
-
Save gorbiz/71f6bedc3dbdf418272a to your computer and use it in GitHub Desktop.
Trello - add support for emojis in card titles
This file contains hidden or 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
| // ==UserScript== | |
| // @name Trello card title emojis | |
| // @version 0.1.2 | |
| // @homepage | |
| // @description Add support for emojis in card titles | |
| // @require //cdn.jsdelivr.net/emojione/1.4.1/lib/js/emojione.min.js | |
| // @match https://trello.com/b/* | |
| // @match http://trello.com/b/* | |
| // ==/UserScript== | |
| function emojiAll() { | |
| var cards = document.getElementsByClassName('list-card-title'); | |
| for (var i = 0; i < cards.length; i++) { | |
| cards[i].innerHTML = emojione.shortnameToImage(cards[i].innerHTML); | |
| } | |
| setTimeout(emojiAll, 500); | |
| } | |
| // style | |
| link = document.createElement('link'); | |
| link.href = '//cdn.jsdelivr.net/emojione/1.4.1/assets/css/emojione.min.css'; | |
| link.type = 'text/css'; | |
| link.rel = 'stylesheet'; | |
| link.media = 'screen,print'; | |
| document.getElementsByTagName('head')[0].appendChild(link); | |
| setTimeout(emojiAll, 5000); |
Author
Author
Would be cool to (fix this and) @match *, and let the script look for ~localStorage.emojinize, when present ~: $(localStorage.emojinize).innerHTML = emoji.replaceAll($(localStorage.emojinize).innerHTML); 😺
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
XXX Broken, almost works ;).