Skip to content

Instantly share code, notes, and snippets.

@jkremser
Last active March 27, 2019 16:52
Show Gist options
  • Save jkremser/2716ff5c6918cc6538f96b56e46f8c13 to your computer and use it in GitHub Desktop.
Save jkremser/2716ff5c6918cc6538f96b56e46f8c13 to your computer and use it in GitHub Desktop.
dark slack
#! /bin/bash
#since slack 2.6.3 there is some hack in that file, so make sure this piece of code goes before the:
#start(assignIn({}, require('electron').remote.getGlobal('loadSettings'), { windowType: 'WEBAPP' }));
#..line
# since 3.0.5
# or before the 'const loadSettings = ...' line
cat << 'EOF' >> /usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js
document.addEventListener('DOMContentLoaded', function() {
$.ajax({
url: 'https://raw.githubusercontent.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 CTRL-R
```
const url1 = 'https://raw.githubusercontent.com/laCour/slack-night-mode/master/css/raw/black.css';
const url2 = 'https://raw.githubusercontent.com/Jiri-Kremser/slack-night-mode/overrides/overrides.css';
document.addEventListener('DOMContentLoaded', function() {
$.ajax({
url: url1,
success: function(css) {
$("<style></style>").appendTo('head').html(css);
}
});
$.ajax({
url: url2,
success: function(css) {
$("<style></style>").appendTo('head').html(css);
}
});
});
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment