Skip to content

Instantly share code, notes, and snippets.

@danielandersson
Created September 25, 2018 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielandersson/3a5087b14c9010d5081f1bd0043ca20e to your computer and use it in GitHub Desktop.
Save danielandersson/3a5087b14c9010d5081f1bd0043ca20e to your computer and use it in GitHub Desktop.
Change Slack theme to Night-Mode
#! /bin/bash
# Don't want to interpret variables whilst reading from the HEREDOC - thus the single quotes... potto
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
echo If Slack.app is already running, refresh with CMD-R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment