-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working with Slack 4.0.0 on Windows #14
Comments
Same on MacOS - there is no longer a The only directories under |
This readme has some idea of how to work in Slack 4 https://github.com/leoandreotti/slack-dark-theme |
Ty @willpower232 !! I just upgraded to Slack 4.0 today (I was on vacation last week) and the lack of the plugins are killing me. I'll have a look tonight and hopefully patch it up. |
There are a number of things that seem to be drastically different under the covers with Slack 4.0, and here's what I've found so far: Some of the plugins work off of and require some global (window.X) variables that don't seem to be present anymore, namely "window.TS" seems to be missing. Those plugins won't work (keybinds, random emoji, simple-find). I'm not sure which other plugins might break in this way. The plugin system as a whole, and some of the individual plugins, were leveraging slack's access to a few node modules (require("fs") being the most important), and that is not accessible anymore. This is a big problem. Due to this, the plugin system doesn't even load. I use the "fs" module in order to find and load files within the $HOME/.slack directory, and that is broken. I did this style to avoid hardcoding which files to load into the file your patching (so you don't have to patch as often), but for now maybe I can just load specific files? Due to the 2 above things, I haven't even gotten as far as attempting to load the dark theme plugin (which is the reason most people come here), but I'd assume/hope that including it statically as a style tag off of a static link could work. Finally, the files I was patching don't exist anymore. It was previously in the I'll race towards a "here's how to manually get dark theme working" manual set of instructions, and work on automatic patching and loading of all plugins after that. |
It's even worse than that. Slack 4.0 now has a CSP (content security policy) that restricts where you can load files from, so you can't even point at a file on disk or from the web to load it. You have to insert the styles via a style tag with text content. I manually modified the css file's contents to remove all comments, newlines, and replace quotes with escaped quotes and was able to insert it in a style tag using innerText, but the styles do need updating. This doesn't seem like it will be quick :-( |
With 4.0, slack has changed the file structure used and as such ssb-interop.js & index.js are no longer located in the "\resources\app.asar.unpacked\src\static" subfolder under the Slack version directory.
The text was updated successfully, but these errors were encountered: