slack-black-theme icon indicating copy to clipboard operation
slack-black-theme copied to clipboard

No longer functions in Slack 3.0.0 beta

Open Bterrell721 opened this issue 6 years ago • 15 comments

Hello,

Thanks for this awesome package, been working wonderfully and I love it. Unfortunately, Slack has recently updated with a new version that seems to invalidate it:

app-3.0.0-beta2638bae9b

I updated the new index.js file in the AppData path with the additional code and restarted Slack, but it seems to be entirely ignoring it and none of the styling or CSS is being applied. Is there some additional tweak I need to make in order for this to continue to function?

Note that it still works perfectly in the most recent non-beta version of 2.8.2

Thanks again, and let me know if I can assist further. Index file is attached. index.zip

Bterrell721 avatar Oct 30 '17 16:10 Bterrell721

Looks like they've re-organized how the the client gets loaded, which their changelog mentions as making everything faster and using less RAM, which is good.

In the current stable version, the "team" view (the part with the channels and chats) lived inside the main Electron panel, which was also where the sidebar is. It doesn't look like it's set up like that any more, so the document.querySelectorAll(".TeamView webview"); selector doesn't find anything any more.

I looked for about 5 minutes and couldn't see how the views are loaded/organized now. You can try if you want, but I'll look later.

widget- avatar Oct 30 '17 18:10 widget-

Would love to see a patch for Slack3 as well :)

SebScoFr avatar Nov 06 '17 15:11 SebScoFr

I love this package and also can't wait to see support for Slack v3.

SamMarkGoldman avatar Nov 07 '17 14:11 SamMarkGoldman

Adding this to src/static/ssb-interop.js appears to work for now.

document.addEventListener('DOMContentLoaded', function() {
  $.ajax({
   url: 'https://cdn.rawgit.com/laCour/slack-night-mode/master/css/raw/black.css',
   success: function(css) {
     $("<style></style>").appendTo('head').html(css);
   }
 });
});

skmexyz avatar Nov 07 '17 17:11 skmexyz

@skmexyz where would you insert that code for a Debian system? There doesn't seem to be a ssb-interop.js in the dir for slack.

jrausch12 avatar Nov 14 '17 14:11 jrausch12

@jrausch12 @skmexyz Same here, no path or file such as that on Windows either.

Edit never mind, I ended up finding it at AppData\Local\slack\app-3.0.0-beta4552e368c\resources\app.asar.unpacked\src\static

Braunson avatar Nov 18 '17 22:11 Braunson

Skmexyz's solution partially works for Slack3. The side bar is still purple but I can live with that.

avelis26 avatar Dec 14 '17 16:12 avelis26

@avelis26 worth noting on OSX (and likely on Windows/Linux), the sidebar colors can be adjusted in preferences. For OSX its Slack -> Preferences ->Sidebar.

A sample sidebar dark theme could be the one found from Dracula

Oxxygen avatar Jan 09 '18 18:01 Oxxygen

This fix used to work on 3.00 but on 3.03 it seems to only partially work. One of my servers works perfectly, black background and white text but another has black on black and the text is not legible. Any idea why?

Morydees avatar Jan 11 '18 05:01 Morydees

I'm on slack 3.0.2 and had to reapply the solution as above. Looks like autoupdates wipes your existing changes (as it should I guess). Applying the above changes and restarting works just as before.

I combine the dark theme with Slack's Ochin theme for the sidebar to have a slightly more consistent Slack.

skmexyz avatar Jan 11 '18 14:01 skmexyz

@skmexyz yep, that matches my experience with 3.0.2 and I was very happy. You might skip 3.0.3 until we're sure on a solution there as I've been unable to get the old fix to work reliably. In fact, can you even disable automatic updating anymore? I sure can't seem to find it.

Morydees avatar Jan 12 '18 00:01 Morydees

Looks like @skmexyz 's fix is working mostly ok again on version 3.0.4 on Windows 10: https://i.imgur.com/KaIH1tj.png

tylercentral avatar Jan 15 '18 18:01 tylercentral

I can't seem to find 3.0.4 on their site and in-program check for updates is showing I'm at latest version for 3.0.3. Perhaps staggered release?

Morydees avatar Jan 16 '18 07:01 Morydees

Probably a staggered release. The slack for windows beta page shows What’s new in 3.0.4 but there is no changelog for that release. I'm unsure, mine auto updated through the desktop app and decided to try this patch again to see how it functioned.

tylercentral avatar Jan 16 '18 15:01 tylercentral

I recommend adding this to the readme. This is still a common issue for the latest slack as of 3.1.1 @widget-

jrausch12 avatar Apr 15 '18 14:04 jrausch12