Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // * * * * * * * *
- // * About *
- // * * * * * * * *
- // Author: Andrew J. Blalock
- // Date: 8/24/2017
- // Description: Set Nicknames in Slack's desktop application.
- //
- // * * * * * * * * *
- // * INSTRUCTIONS *
- // * * * * * * * * *
- // Append this to the end of the file:
- // C:\Users\{USERNAME}\AppData\Local\slack\app-{SLACK-VERSION}\resources\app.asar.unpacked\src\static\ssb-interop.js
- //
- // Add entries in the array 'nicks'. The first value it the persons
- // display name, and the second is the nickname to display for them.
- var nicks = [
- ["Name1", "Nickname1"],
- ["Name2", "Nickname2"],
- ["Name3", "Nickname3"]
- ];
- document.addEventListener('DOMContentLoaded', function() {
- $.each( nicks, function( key, value ) {
- $("<script></script>").appendTo('head').html('$(document).ready(function(){ \
- $("*").mouseover(function() { $(".p-channel_sidebar__name:contains(\'' + value[0] + '\'):not(:contains(\',\'))").each(function(){$(this).text(\'' + value[1] + '\');});}); \
- $("*").mouseover(function() { $(".p-channel_sidebar__name:contains(\',\')").each(function(){$(this).css("color", "#5876a7");});}); \
- $("*").mouseover(function() { $("a.message_sender:contains(\'' + value[0] + '\')").each(function(){$(this).text("' + value[1] + '");}); }); \
- $("*").mouseover(function() { $("button#im_title:contains(\'' + value[0] + '\')").each(function(){$(this).text("' + value[1] + '");}); });});');
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement