kfahy / slack-disable-wysiwyg-bookmarklet

Disables the WYSIWYG editor in Slack.
MIT License
823 stars 23 forks source link

Activating this in Franz #5

Closed adrianmcli closed 4 years ago

adrianmcli commented 4 years ago

I've figured out how to activate this in Franz, the Electron-based messaging aggregator tool.

  1. Use the keyboard shortcut to open up the inspector:

    • Mac: ⌘ command + ⌥ option + I
    • Windows/Linux: ⌃ ctrl + ⇧ shift + I
  2. Open up the console tab, and run the following to open up the current app's (i.e. Slack instance) dev console:

    $(".app__service .is-active webview").openDevTools()
  3. In the new window where this pops up, paste in the script from index.js without the javascript: prefix. Here's a simplified version (courtesy of https://github.com/kfahy/slack-disable-wysiwyg-bookmarklet/pull/3):

    (_ => {
     const redux = slackDebug[slackDebug.activeTeamId].redux;
     const {wysiwyg_composer, wysiwyg_composer_ios, wysiwyg_composer_webapp, ...payload} = redux.getState().experiments;
     redux.dispatch({ type: '[19] Bulk add experiment assignments to redux', payload });
    })()

Should we document this as well?

kfahy commented 4 years ago

Oh nice find! I hadn't heard of Franz before - does it embed Slack's Electron app inside of its own Electron app?

Yeah this would be great to document. Please feel free to put up a PR, otherwise I'll take a look at Franz tonight and add the docs then. Thanks!

adrianmcli commented 4 years ago

Yeah it's one of many, but I think it's relatively popular. I'll work on that PR!