Skip to content

Instantly share code, notes, and snippets.

@XtinaSchelin
Created October 17, 2016 18:03
Show Gist options
  • Select an option

  • Save XtinaSchelin/5e40992569afc4cc0adbc45458528f03 to your computer and use it in GitHub Desktop.

Select an option

Save XtinaSchelin/5e40992569afc4cc0adbc45458528f03 to your computer and use it in GitHub Desktop.
// ==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