Slack desktop dark theme

If you love dark themes everywhere as much as I do, you surely have been wondering why Slack still does not support one.

Here is a quick tutorial how to use a dark theme on desktop Slack on macOS:
(see links below for win/linux/browser support)

1
2
3
4
5
6
7
8
9
10
cat << 'EOF' >> /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js
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);
   }
 });
});
EOF

In case you run into “permission denied” just do a sudo su - and run the script then.

Also, if you want to be correctly careful you should create a local copy of the css file…

Credits:
https://github.com/laCour/slack-night-mode
https://github.com/laCour/slack-night-mode/issues/73

The big question is - why is Slack forcing us do hack it this way?!?