Skip to content

Instantly share code, notes, and snippets.

@aamiaa
Last active April 29, 2024 21:25
Show Gist options
  • Star 445 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save aamiaa/fbf6e51dbb8875a781a3d8d76fc3f3e7 to your computer and use it in GitHub Desktop.
Save aamiaa/fbf6e51dbb8875a781a3d8d76fc3f3e7 to your computer and use it in GitHub Desktop.
Revert New Discord Layout

The original snippet no longer works!

On 02/09/2024 at around 8pm UTC, Discord flipped an experiment (2023-09_mobile_redesign_override_toggles) which ignores the layout toggle that this script relied on.

If you want to continue using the old layout, you can either use a modded mobile client (such as Vendetta) to disable that experiment, or downgrade to an old version of the app.

Method 1 - Downgrading (Android)

Tip

Use this one if you want a fast, beginner-friendly solution and don't mind using a version from November 2023

  1. Download version 205.15 of Discord mobile app from ApkMirror
  2. Download ApkMirror's installer to install the downloaded "apk bundle"
  3. Enjoy :)

Method 2 - Vendetta (Android)

  1. Download and install Vendetta Manager
  2. Open it
  3. Tap the settings icon in top right corner
  4. Go to Advanced, tap on "Check for Discord updates" and set it to "Disabled"
  5. Go back to settings, then go to "About"
  6. Tap the version number below the "Vendetta Manager" label a few times until it says "You're now a developer"
  7. Go back to settings, then go to "Developer only"
  8. In the text field that says "Discord version" enter this number: 215024 (it's the last version that still has the old channels list in old layout)
  9. Exit out of settings
  10. Press "Install" on the main screen
  11. Wait for Vendetta to install, open it once it's finished
  12. Login to Vendetta with your Discord account like normal
  13. Go to Settings -> Plugins
  14. Click the + button, paste this link: https://vd-plugins.github.io/proxy/maisymoe.github.io/strife/Experiments/ and click Install
  15. Restart the app
  16. Go to Settings -> Experiments
  17. Set Tabs V2 - redesign opt-out for T2 to Treatment 1: show
  18. Set Tabs V2 - redesign opt-out/in for all to Not Eligible

(If your Discord didn't switch back to old layout after this step, go to Settings -> Appearance and flip the "Show New Layout" toggle off)

  1. Set Mobile Chat Input Action Menu to Not Eligible
  2. If you still have the new layout in user settings, set You Tab Individual Feature to Not Eligible

iOS

I don't have an iOS device so I don't know much about sideloading or jailbreaking, but I believe you should be able to install Vendetta and follow the same steps as for Android. I think the IPAs for non-jailbroken devices listed there might even be old enough for you to not worry about messing with experiments.


View original gist

Revert New Discord Layout

How to use this script:

  1. Go to https://discord.com/app
  2. Press Ctrl + Shift + I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter:
let wpRequire;
window.webpackChunkdiscord_app.push([[ Math.random() ], {}, (req) => { wpRequire = req; }]);

let UserSettingsActions = Object.values(wpRequire.c).find(x => x?.exports?.PreloadedUserSettingsActionCreators).exports;
let ProtobufTypes = Object.values(wpRequire.c).find(x => x?.exports?.BoolValue).exports;

UserSettingsActions.PreloadedUserSettingsActionCreators.updateAsync("appearance", data => {
    data.mobileRedesignDisabled = ProtobufTypes.BoolValue.create({value: true})
}, UserSettingsActions.UserSettingsDelay.INFREQUENT_USER_ACTION)

This code requires no changes, preserves all your other appearance settings (such as theme), as well as automatically includes all relevant Discord headers, reducing any risks to minimum.

How does this work?

This emulates flipping the Show New Layout toggle in appearance settings. Yes the toggle is server-synced for some reason.

Note: This is only a temporary solution. Discord will start ignoring that setting in some future update.


This was inspired by @xeuk's original snippet

@Unbloated
Copy link

The only method now is downgrading, experiments stopped working at around 225.10 - Beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment