Skip to content

Instantly share code, notes, and snippets.

@Xeukxz
Last active March 9, 2024 10:06
Show Gist options
  • Save Xeukxz/a1b55f38f5ede22e757b3894430066db to your computer and use it in GitHub Desktop.
Save Xeukxz/a1b55f38f5ede22e757b3894430066db to your computer and use it in GitHub Desktop.
Revert Discord UI

Updated Version:

If you want to download an older version ive heard 205.15 works well, i reccomend ApkMirror

Using a modified app (Android & IOS friendly):

  1. Follow the instructions from https://github.com/vendetta-mod/Vendetta
  2. After the client is installed, navigate to Settings > Plugins, then click the +, and finally paste https://vd-plugins.github.io/proxy/maisymoe.github.io/strife/Experiments into the input and click Install
  3. Once the experiments plugin is enabled, reload the app then go to Settings > Experiments > Tabs V2 - redesign opt-out/in for all and select Control Bucket.

Ive also heard enmity works well for IOS.

Note that if you re-enable the new ui via the toggle switch, u will have to run the script to dissable it, the script still works if the Tabs V2 - redesign opt-out/in for all experiment is set to Control

Old Script Method. (Still works when above experiment set to control)

Revert Mobile Discord UI

The following code updates your user setting to toggle the mobileRedesignDisabled setting to true, this must be done via the the web/desktop client

It is reccomended to use the discord web app: https://discord.com/app

Shoutout to @aamiaa for writing a much more elegant script, go show them some love

To run the script, you must:

  • Go to the discord web/desktop client
  • Log into your account
  • Press Ctrl + Shift + I or F12 and the Developer Tools window should appear
  • Click the Console tab at the top
  • Then paste the following code into the developer console and press enter:
// get discords modules
let wpRequire;
window.webpackChunkdiscord_app.push([[ Math.random() ], {}, (req) => { wpRequire = req; }]);

// find the user settings module
let UserSettingsActions = Object.values(wpRequire.c).find(x => x?.exports?.PreloadedUserSettingsActionCreators).exports;
// find the protobuf module (settings encoding)
let ProtobufTypes = Object.values(wpRequire.c).find(x => x?.exports?.BoolValue).exports;

// use the modules to update users settings to set mobileRedesignDisabled to true
UserSettingsActions.PreloadedUserSettingsActionCreators.updateAsync("appearance", data => {
    data.mobileRedesignDisabled = ProtobufTypes.BoolValue.create({value: true})
}, UserSettingsActions.UserSettingsDelay.INFREQUENT_USER_ACTION)

(Added comments to make it clear what the script is doing. That being said, you should not run scripts unless you have read through them to ensure they arent malicious. Ive left a detailed breakdown of the code at the bottom of this post)

compact version:

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)

After running the script, you should instantly go back to the old discord layout

If you run into any issues check the comments below to see if ther are any issues reported
If not, leave a comment and i would be happy to assist you

Undoing The Revert

If for any reason you need to go back to the new UI and both the toggle switch is missing in appearance settings, and the sparkle emoji method isnt working, then you can run this script:

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:false})},UserSettingsActions.UserSettingsDelay.INFREQUENT_USER_ACTION)

Detailed Code Breakdown

Expand this to view an in depth breakdown of what the code does

Getting discord's code:

The first 2 lines get the webpack modules from discord, this gives us access to all discords methods and values.

let wpRequire;
window.webpackChunkdiscord_app.push([[ Math.random() ], {}, (req) => { wpRequire = req; }]);

Initialising the wpRequire variable and then setting it with (req) => { wpRequire = req; }

Finding the user settings module:

The next line finds the user settings module, this is used to update the user settings.

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

This code searches for the module with the PreloadedUserSettingsActionCreators export, this is the module that contains the updateAsync method which is used to update settings.

Finding the protobuf module:

The next line finds the protobuf module, this is used to encode the settings data.

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

This code searches for the module with the BoolValue export, this is the module that contains the BoolValue.create method which is used to encode the settings data.

Protobuf is a data encoding method used by discord to encode data, this allows discord to send data in a compact format.

Updating the user settings:

The final lines updates the user settings to set mobileRedesignDisabled to true

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

This code calls the updateAsync method from the UserSettingsActions module, this method takes 3 arguments:

  • section - the section of the settings to update
  • update - a method that takes the current settings data and updates it
  • delay - the delay before the settings are updated

The section argument is set to appearance as this is the section that contains the mobileRedesignDisabled setting.

The update argument is a method that takes the current settings data and updates it, this method is called with the current settings data as the first argument, this is then updated to set mobileRedesignDisabled to true using the create method from the ProtobufTypes module.

The delay argument is set to UserSettingsActions.UserSettingsDelay.INFREQUENT_USER_ACTION as this is the delay used by discord when updating settings.

Again, credit goes to @aamiaa for writing this much more elegant and safe script

@No767
Copy link

No767 commented Feb 9, 2024

people already sent several feedbacks to make it better and like any other large tech company(like Google), they don't listen to ui/ux feedback unless they feel its necessary to their own needs. you can easily fight against this change by just modding your discord client or using the legacy discord client right before the rebrand.

@kairusds You can't really fight it. Sure you can mod your client, or use an different one entirely, but what's the point of trying to fight? The reason why they don't listen is that it's simply not worth it to migrate back due to the years of technical debt, UI code, and previous decisions that led to the new UI changes. This is even documented and publicly said by some of the Discord developers on their blog post in regards to it.

@No767
Copy link

No767 commented Feb 9, 2024

@SnivyFilms you are always free to express your opinions, but letting you know that I'm filing for harassment. To me this just sounds like an untamed child trying to cause chaos just because of different opinions and perspectives

@VampireChicken12
Copy link

@SnivyFilms you are always free to express your opinions, but letting you know that I'm filing for harassment. To me this just sounds like an untamed child trying to cause chaos just because of different opinions and perspectives

😂

@kairusds
Copy link

kairusds commented Feb 9, 2024

people already sent several feedbacks to make it better and like any other large tech company(like Google), they don't listen to ui/ux feedback unless they feel its necessary to their own needs. you can easily fight against this change by just modding your discord client or using the legacy discord client right before the rebrand.

@kairusds You can't really fight it. Sure you can mod your client, or use an different one entirely, but what's the point of trying to fight? The reason why they don't listen is that it's simply not worth it to migrate back due to the years of technical debt, UI code, and previous decisions that led to the new UI changes. This is even documented and publicly said by some of the Discord developers on their blog post in regards to it.

the point of trying to fight it is to show your stance regarding the change, if you just keep letting these entities forcefully spoonfed you with stuff that you don't want, you will become eventually numb to it, to the point that what's normal is dictated by these entities and not yourself. the technical debt isn't even a problem, as they can easily recreate the codebase for the ui/ux while maintaining the same classic style and having a modern feel to it. take google play store for example, they changed the ui/ux a lot since android 2, but it still has that same feel while still fitting with their modern design language. it's just an excuse on discord's part because they want to push forward changes that only fits their narrative.

@kasenibaraki
Copy link

whoever suggested enmity cheers works wonders for iOS just follow the stuff that's said in enmity discord

@kairusds
Copy link

kairusds commented Feb 9, 2024

whoever suggested enmity cheers works wonders for iOS just follow the stuff that's said in enmity discord

would also recommend vendetta for android

@No767
Copy link

No767 commented Feb 9, 2024

@kairusds nice speech 🥱

@kairusds
Copy link

kairusds commented Feb 9, 2024

@kairusds nice speech 🥱

thanks, i appreciate it

@nxriv
Copy link

nxriv commented Feb 10, 2024

@nxriv @ks00908 you both are looking into the wrong direction. If you are so inclined to use the old UI, then I would suggest migrating to either Aliucord (for Android) or Enmity (for iOS). Note that I do not use Enmity. Monkeypatching Discord's new UI changes isn't going to work as Discord will always find a way to fix them

If I am not mistaken, apps like these directly violate discords ToS (as does the original script). For users who do not want to violate them, downgrading is a solid solution.

@yogi701
Copy link

yogi701 commented Feb 10, 2024

As Vendetta is discontinued, I hope it will work with Aliucord.
EDIT: Nevermind, Aliucord is just old version of Discord

@Xiutecuhtli
Copy link

205.15 worked for me on Android. I had run the script before downloading that version, I don't know if it was a required step to make it work.

Some notes:
If you are looking online for the version, and can't find 205.15, maybe you are on the page for Desktop versions instead of Android.
If it says "App not installed as package appears to be invalid", make sure you uninstalled the previous version of discord, and also uninstall it inside Secure Folder if you have discord installed inside there too. I was struggling with that error message for a bit until I saw online mentions about Secure Folder.

@0withoutface0
Copy link

0withoutface0 commented Feb 10, 2024

@SnivyFilms you are always free to express your opinions, but letting you know that I'm filing for harassment. To me this just sounds like an untamed child trying to cause chaos just because of different opinions and perspectives

@No767 i dont really see which part of this was a harrassment but ok. i have no idea how you want to fill papers for harrassment without a real name tho. at most you can get github to delete their account (1 follower)

i find the old ui more convenient. thats it. if there is a way to revert it i will do, if they disable it completely i will somehow get used to it.

@ks00908
Copy link

ks00908 commented Feb 10, 2024

@SnivyFilms you are always free to express your opinions, but letting you know that I'm filing for harassment. To me this just sounds like an untamed child trying to cause chaos just because of different opinions and perspectives

"Ooooh nooo someone disagreed with me, its harrasment!"

Grow up
If you dont have counterargument to someones point just admit to it or stay silent, dont try to deflect by crying harrasment.

@Mineplayerminer
Copy link

FIX ANDROID & IOS

Yoo!!! For those who have 'Vendetta' (Modded Mobile Discord) and the 'Experiments' plugin enabled & installed, I fixed it by doing these 2 toggles for the old UI and searching '2023-09_mobile_redesign_override_toggles'. It worked! Enjoy lol 🙂 Screenshot_20240209_214636 Screenshot_20240209_215154

Vendetta Download (iOS & Android)

Link: https://vendetta.rocks/ Vendetta Discord: https://discord.com/invite/vendetta-mod

How to install Experiments Plugin (5 Steps)?

Experiments Plugin Link: https://vd-plugins.github.io/proxy/maisymoe.github.io/strife/Experiments/

  1. Copy this link
  2. Paste this link here after clicking the '+' button in the 'Plugins' tab at the top right corner
  3. Paste it like so:
    Screenshot_20240209_222958
  4. Install the plugin with the copied link
  5. You're done! Now go back and scroll to the bottom. You should see the 'Experiments' tab.

Plugin Recommendation

Personally, I recommend installing the 'Plugin Browser' plugin, which let's you browse & install plugins easily in a dedicated tab.

Plugin Browser Link: https://vendetta.nexpid.xyz/plugin-browser/

Install it the same way as the 'Experiments' plugin. That's everything! Thanks for reading! 👍

Funguje to aj bez rootu, alebo potrebujem su root privilégia? Videl som český Discord tak prečo neopýtať rovno :DD

@yogi701
Copy link

yogi701 commented Feb 27, 2024

1000002990
Is there a way to disable this shit?

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