Last active
March 27, 2019 16:52
-
-
Save jkremser/2716ff5c6918cc6538f96b56e46f8c13 to your computer and use it in GitHub Desktop.
dark slack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
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