5 ms·
You can do it in the desktop app as well. If you run it with SLACK_DEVELOPER_MENU=true in env vars, it'll enable you to right click to Inspect Element, open dev
by d4rky 7y ago
You can do it in the desktop app as well. If you run it with SLACK_DEVELOPER_MENU=true in env vars, it'll enable you to right click to Inspect Element, open devtools and run this code snippet there
- underwater 7y agoI wonder if the people who complain about Electron apps will refrain from doing this out of principle.
- d4rky 7y agowell, they can use the browser version and have this snippet working without any extra steps
- hattar 7y agoI don't understand the point of electron for applications whose functionality is entirely dependent on being online anyway. At that point, just use a browser as it's one fewer item to install. Is the Electron version of Slack capable of anything beyond the browser version?
- jrockway 7y agoYou can include native code in Electron apps. I am not sure it is actually needed in any of the messaging Electron apps (Slack, Discord), but the capability is there. My favorite Electron app is Balena Etcher. It is "dd" but uses 200MB of RAM. It is AMAZING.
- sly010 7y ago> It is "dd" but uses 200MB of RAM. Say no more. I am sold.
- _-___________-_ 7y agoDoes it actually include any native code, or does it just wrap `dd`? I tried this app and it was beyond awful. I went back to `dd`.
- jrockway 7y agoApparently it uses some native code to get the necessary permissions on Windows: https://github.com/balena-io/etcher/blob/master/src/os/win32/elevate.cpp https://github.com/balena-io/etcher/blob/master/src/os/win32...
- reificator 7y ago> You can include native code in Electron apps. I am not sure it is actually needed in any of the messaging Electron apps (Slack, Discord), but the capability is there. Discord has options for streaming your game to others, identifying running processes to display games as your status, downloading and launching games, and displaying a chat overlay on top of external game processes. Some of those can be accomplished in a roundabout way without native code, but I think it's safe to say Discord benefits from that ability.
- jrockway 7y agoThat is all available in WebRTC.
- reificator 7y ago> That is all available in WebRTC. Seriously? I thought it was just a networking protocol. Can you please provide some examples so I can dig in further? * streaming your game to others - I know that there are window capture APIs in browsers now, or at least in WebExtensions[0]. Then you stream the result over WebRTC, makes perfect sense to me. * identifying running processes to display games as your status - Does WebRTC really have access to inspect running processes? That's horrifying. * downloading and launching games - By downloading here I meant managing your installed games like an app store. They had everything from 2D games like Hollow Knight to open world 3D games that require a decent amount of horsepower like Saints Row. It looks like they've actually killed this feature, but either way I'm not really sure how WebRTC helps manage installed applications. * displaying a chat overlay on top of external game processes - I can imagine how you'd accomplish this via WebRTC for games that expose an API to enable it, but rendering on top of an arbitrary game doesn't seem like something WebRTC allows. [0]: https://chrome.google.com/webstore/detail/chrome-remote-desktop/inomeogfingihgjfjlpeplalcfajhgai https://chrome.google.com/webstore/detail/chrome-remote-desk...
- blacksmith_tb 7y agoHmm, that doesn't seem totally fair - it's 'dd' but with guardrails so that schoolchildren who want to flash raspbian onto an SD card don't accidentally overwrite their boot disk.
- jrockway 7y agoI think you can do that without involving Chromium, but I am not well-versed in the ways of full-stack enterprise-ready desktop apps.
- Jarwain 7y agoSome users prefer having a separate app with its own icon and window instead of another tab in a browser. It keeps things Separate
- NateEag 7y agoSpecifically it makes it easier to get straight to the chat app. I suppose I could use Hammerspoon to script hotkeys that jump straight to a Chrome tab with the right title, but that sounds like a lot more work than just binding a key combo to focus "Slack.app" (which is what I currently do).
- mijoharas 7y agoThis is all I want from an electron app, and is basically the main reason I really want PWAs to take off.
- petemill 7y agoYou can do this already for slack in chromium browsers. Click Menu -> More Tools -> Create Shortcut. The app will run in an app window and NOT a tabbed browser window, just like a PWA, with it's own dock icon and cmd-tab icon.
- dependenttypes 7y agoYou can just create a shortcut with a custom icon that opens slack in a new browser window then.
- somehnguy 7y agoMissing the point. I don't want it in my browser. My browser is used for reference materials and things like that. My chat app is its own separate thing and easily switched to.
- petemill 7y agoYou can do this already for slack in chromium browsers. Click Menu -> More Tools -> Create Shortcut. The app will run in an app window and NOT a tabbed browser window, just like a PWA, with it's own dock icon and cmd-tab icon.
- beatgammit 7y agoI think it can do screen sharing in calls, whereas the browser app can only do voice calls (and maybe video, I can't recall).
- psanford 7y agoThey could implement screen sharing in the browser version via webrtc.
- deadbunny 7y agoI like having a separate app as I can use the window class in X to manipulate which desktop it opens on without too much fucking about.
- latexr 7y ago> I don't understand the point of electron for applications whose functionality is entirely dependent on being online I’ve made electron apps that load a website I have no control over and added features to it, including new styling, keyboard shortcuts, and command-line flags. I would have built a native app, but documentation on making macOS app is awful while electron’s documentation is top notch.
- pavel_lishin 7y agoThis is incredible.
- CraneWorm 7y agoI set the env variable but I can't seem to get the access to devtools? Only regular menu appears on right-click.
- ripley12 7y agoSame for me on macOS.
- d4rky 7y agoTry like this: SLACK_DEVELOPER_MENU=true /Applications/Slack.app/Contents/MacOS/Slack
- mijoharas 7y agoslack tends to keep a process in the background that needs to be killed and restarted when you "close" it. did you run `pkill slack` or similar and then restart?
- CraneWorm 7y agogood tip, thank you!
- oueasley 7y agoTry quitting Slack and just running this from the console. It worked for me: export SLACK_DEVELOPER_MENU=true open /Applications/Slack.app
- ihuman 7y agoAlternatively, you can run `launchctl setenv SLACK_DEVELOPER_MENU true` and then the dev menu will work if you launch slack from anywhere, and will persist until you log out. If you create the following plist in ~/Library/LaunchAgents, macOS will set that env variable every time you log in (except if you tell it to reopen windows when logging back in). Change "NAME.OF.FILE" to the plist's filename without the .plist extension. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>NAME.OF.FILE</string> <key>RunAtLoad</key> <true/> <key>ProgramArguments</key> <array> <string>sh</string> <string>-c</string> <string>launchctl setenv SLACK_DEVELOPER_MENU true</string> </array> </dict> </plist>
- s_gourichon 7y ago@ihuman Is this really an "alternative"? To me it is a platform-specific "howto" (in that case, Mac OS X) that implements a platform-neutral recommendation (parent post).