Skip to content

Instantly share code, notes, and snippets.

@rakisaionji
Forked from aamiaa/RevertNewLayout.md
Created January 18, 2024 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rakisaionji/67e970970c22d8a6a1946cc20688ad46 to your computer and use it in GitHub Desktop.
Save rakisaionji/67e970970c22d8a6a1946cc20688ad46 to your computer and use it in GitHub Desktop.
Revert New Discord Layout

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

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