DEV Community

Discussion on: Easy Dark Mode for Slack

Collapse
 
jknight0014 profile image
jknight0014

This will work for you. Again, put it at the end of the ssb-interop.js file. If you are running on Windows, use the forward slash and start the path with 'C:/' :

document.addEventListener('DOMContentLoaded', function() {
var fs = require('fs'),
filePath = '/Applications/Slack.app/Contents/Resources/black-slack.css';

fs.readFile(filePath, {encoding: 'utf-8'}, function(err, data) {
if (!err) {
var css = document.createElement('style')
css.innerText = data;
document.getElementsByTagName('head')[0].appendChild(css);
}
})
});