2

When accessing Slack's web version (not the desktop app) on a Chromebook, there seems to be a feature where the workspace switcher sidebar appears on the left:

enter image description here

This only appears to happen when viewing the web version on a Chromebook. I found this Reddit thread suggesting that Slack special-cases Chromebook to show this sidebar because Chromebooks don't support the desktop app version of Slack.

Is it somehow possible to make Slack show the workspace switching sidebar on other web clients too, besides Chromebooks?

1
  • So far, I tried a simple user-agent switching extension to imitate a Chromebook from my Ubuntu laptop, but this doesn't seem to do the trick.
    – Pi Delport
    Jul 28, 2020 at 17:57

3 Answers 3

4

With Jai Pandya's insight, and some more experimentation, it looks like having the string "CrOS" appear in the navigator.userAgent property is enough to make Slack show the workspace sidebar. 🎉️

Here's a minimal user script that does that:

// ==UserScript==
// @name         Slack Web Workspace Sidebar
// @match        https://app.slack.com/*
// ==/UserScript==

Object.defineProperty(navigator, 'userAgent', {
    value: navigator.userAgent + ' CrOS'
});

I put a packaged version up here (for use with a userscript manager):

1
  • 1
    That's a wonderful insight. Thanks for packaging it into a user script. Very handy.
    – Jai Pandya
    Sep 25, 2020 at 20:10
3

I can see the workspace switching sidebar when I switch my User-Agent to Chrome on Chrome OS. It might have to do with the User-Agent string you are using. Here are the steps I've taken:

Chrome on Mac OS -> Developer Tools -> More Tools -> Network Condition

Chrome Dev Tools Network Conditions panel

In the Network Conditions panel make sure Select Automatically is deselected. Now select Chrome - Chrome OS.

How to select Chrome - Chrome OS User Agent

This is the User-Agent string being used:

Mozilla/5.0 (X11; CrOS x86_64 10066.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36

1
  • That method works! It turns out that using this method also has the effect of overriding the value of navigator.userAgent, not just the User-Agent header: it appears that Slack uses the JavaScript property for its conditional logic, not the header.
    – Pi Delport
    Sep 25, 2020 at 15:14
3

Here's a Chrome extension that implements the CrOS user agent hack: https://chrome.google.com/webstore/detail/always-show-slack-workspa/diebigeemhcipelnipggjihcmgjlacge

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.