6 ms·
The hack I used to use to inject CSS into the app for a dark theme is no longer viable. So that changed.
by phlyingpenguin 7y ago
The hack I used to use to inject CSS into the app for a dark theme is no longer viable. So that changed.
- jumbopapa 7y agoI got the dark theme to work. Would you be interested in a write up?
- passivepinetree 7y agoI would! I imagine others would be as well.
- jumbopapa 7y agoDirections for adding in Dark Mode/Theme into Slack 4.0 using Windows (It should work mostly the same on other OS's, but you'll need to tweak it a little): 1. You'll first need the ability to open .asar archives. This can be done with 7-zip along with the following package: Asar7z (http://www.tc4shell.com/en/7zip/asar/ http://www.tc4shell.com/en/7zip/asar/). Follow the installation instructions on the site and keep in mind you need administrative privileges to copy files to Program Files. 2. Completely close down Slack via Task Manager → End Task (Simply closing the application is not enough, you must kill it in task manager) 3. Navigate to the following file in your user app data C:\Users\{usernamePlaceHolder}\AppData\Local\slack\app-4.0.0\resources\ 4. Find app.asar and first create a backup 5. Right-click app.asar and select 7-zip→Open Archive 6. Navigate down to the dist folder, right-click the ssb-interop.js file, and select Edit: 7. Scroll to the bottom of the large block of unreadable javascript (it's minified) and paste the code snippet to the bottom of the file. document.addEventListener('DOMContentLoaded', function() { $.ajax({ // Note: change the URL to whatever css file you want. This one works well enough for me. I have it locked to a commit to prevent XSS url: 'https://raw.githubusercontent.com/laCour/slack-night-mode/5e3b2ba1303cf98775c386994730d9f87e8e8218/css/raw/black.css', success: function(css) { $("<style></style>").appendTo('head').html(css); } }); }); 8. Save the file and close the archive in 7-zip. Reboot Slack. Note: that you'll have to reapply this fix every time Slack pushes an updated