Created
February 4, 2016 15:06
-
-
Save joeshaw/8f15158a398dd014d317 to your computer and use it in GitHub Desktop.
Display slack handles next to real names
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
function addNicks() { | |
$(".message_sender").map(function() { | |
var name = $(this).data("x-name"); | |
if (!name) { | |
name = $(this).text(); | |
$(this).data("x-name", name); | |
} | |
var href = $(this).attr("href"); | |
if (href) { | |
var nick = href.slice(6); | |
$(this).text(name + " (@" + nick + ")"); | |
} | |
}); | |
} | |
// ugggghhhh | |
setInterval(addNicks, 250); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment