Created
October 17, 2016 18:03
-
-
Save XtinaSchelin/5e40992569afc4cc0adbc45458528f03 to your computer and use it in GitHub Desktop.
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 Slack Emoji Image Linkage | |
| // @namespace http://xtina.dreamwidth.org/ | |
| // @version 0.1 | |
| // @description Make emoji images linkable. | |
| // @author Xtina | |
| // @match https://*.slack.com/customize/emoji* | |
| // @grant none | |
| // ==/UserScript== | |
| $( document ).ajaxComplete(function() { | |
| $("tr.emoji_row").each(function(index) { | |
| $cell2 = $(this).find("td")[2]; | |
| if ($cell2.innerHTML == "Image") { | |
| $imgUrl = $(this).find("span")[0].getAttribute("data-original"); | |
| $cell2.innerHTML = "<a href='" + $imgUrl + "' target='_blank'>" + $cell2.innerHTML + "</a>"; | |
| } | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment