In your favorite text editor, open the following file :
- Windows
C:\Users\<USERNAME>\AppData\Local\slack\app-<VERSION>\resources\app.asar.unpacked\src\static\ssb-interop.js
- macOS
Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js
- (To open Slack.app, right click on Slack app icon and click on
Show Package Contents
)
- (To open Slack.app, right click on Slack app icon and click on
- Linux (tested on Fedora)
/usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js
and add the following line at the end of the openned file :
document.addEventListener('DOMContentLoaded', function() {
$.ajax({
url: 'https://cdn.rawgit.com/laCour/slack-night-mode/master/css/raw/black.css',
success: function(css) {
$("<style></style>").appendTo('head').html(css);
}
});
});
To make your sidebar fit your new colors, you can specify directly in your preferences your sidebar colors!
From your slack app, go to hamburger menu, then click Files > Preferences > Sidebar > Theme > Custom Theme
then copy paste the following :
#363636,#444A47,#D39B46,#FFFFFF,#434745,#FFFFFF,#99D04A,#DB6668
Ubuntu Snap:
Create a copy of the 'ssb-interop.js' file (
/snap/slack/current/usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js
) and put it somewhere you can remember. Then add the above event listener.As root user create a crontab
crontab -e
and add the following line:@reboot mount --bind -o nodev,ro /home/krazyito/scripts/ssb-interop.js /snap/slack/current/usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js
Make sure to update the above with where you put your script.
Going to edit this with a script today, to make sure the ssb-interop.js file is always updated.