Skip to content

Instantly share code, notes, and snippets.

@Xeukxz
Last active March 9, 2024 10:06
Show Gist options
  • Star 115 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • 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

Revert Mobile Discord UI

The following code sends a patch request to discord which disables the new UI, this must be done via the the web/desktop client

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

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:
// get the client data from the webpack chunk
let clientData = (webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m);
// get the theme from the client data
let themeData = clientData.find(m=>m?.exports?.default?.gradientPreset!==void 0)?.exports?.default?.gradientPreset.id || clientData.find(m=>m?.exports?.default?.theme!==void 0).exports.default.theme;
// define list of nitro themes to prevent themes from resetting to default dark/light
let gradientThemes={'0':'agoIAhABGgISACAB','1':'agwIAhABGgQSAggBIAE=','2':'agwIAhABGgQSAggCIAE=','3':'agwIAhABGgQSAggDIAE=','4':'agwIAhABGgQSAggEIAE=','5':'agwIAhABGgQSAggFIAE=','6':'agwIAhABGgQSAggGIAE=','7':'agwIAhABGgQSAggHIAE=','8':'agwIARABGgQSAggIIAE=','9':'agwIARABGgQSAggJIAE=','10':'agwIARABGgQSAggKIAE=','11':'agwIARABGgQSAggLIAE=','12':'agwIARABGgQSAggMIAE=','13':'agwIARABGgQSAggNIAE=','14':'agwIARABGgQSAggOIAE=','15':'agwIARABGgQSAggPIAE=','17':'agwIARABGgQSAggRIAE=','18':'agwIARABGgQSAggSIAE=','19':'agwIARABGgQSAggTIAE=','20':'agwIARABGgQSAggUIAE=','21':'agwIARABGgQSAggVIAE='};
// get the user's token from the client data
let token = clientData.find(m=>m?.exports?.default?.getToken!==void 0).exports.default.getToken();
// select the encoded string based on the theme
// if user is using default light/dark theme, set the encoded string to the default light/dark theme
let encodedString = typeof themeData === 'string' ? 
  themeData == 'light' ? 'agYIAhABIAE=' : 'agYIARABIAE=' 
// else user is using a nitro theme, set the encoded string to the nitro theme
  : gradientThemes[themeData]; 

// send a request to discord settings to update a value
fetch("https://discord.com/api/v9/users/@me/settings-proto/1", {
  method: "PATCH",
  headers: {
    // use the user's token to tell discord which account to update the settings for
    "Authorization": token,
    // set Content-Type header to tell discord what format the data is being sent as
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    // send the encoded string of `{appearance: {theme: 1 || 2,developerMode: true,mobileRedesignDisabled: true}`
    "settings": encodedString
  }),
}).then(res => {
  // if the patch works, log "Success", if not, log "Failed"
  // if it logs failed please make a comment below so i can assist
  res.ok ? console.log("Success") : console.log("Failed");
})

(added comments to make it clear what the script is doing)

Compact version:

let clientData=(webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m);let themeData=clientData.find(m=>m?.exports?.default?.gradientPreset!==void 0)?.exports?.default?.gradientPreset.id||clientData.find(m=>m?.exports?.default?.theme!==void 0).exports.default.theme;let gradientThemes={'0':'agoIAhABGgISACAB','1':'agwIAhABGgQSAggBIAE=','2':'agwIAhABGgQSAggCIAE=','3':'agwIAhABGgQSAggDIAE=','4':'agwIAhABGgQSAggEIAE=','5':'agwIAhABGgQSAggFIAE=','6':'agwIAhABGgQSAggGIAE=','7':'agwIAhABGgQSAggHIAE=','8':'agwIARABGgQSAggIIAE=','9':'agwIARABGgQSAggJIAE=','10':'agwIARABGgQSAggKIAE=','11':'agwIARABGgQSAggLIAE=','12':'agwIARABGgQSAggMIAE=','13':'agwIARABGgQSAggNIAE=','14':'agwIARABGgQSAggOIAE=','15':'agwIARABGgQSAggPIAE=','17':'agwIARABGgQSAggRIAE=','18':'agwIARABGgQSAggSIAE=','19':'agwIARABGgQSAggTIAE=','20':'agwIARABGgQSAggUIAE=','21':'agwIARABGgQSAggVIAE='};let token=clientData.find(m=>m?.exports?.default?.getToken!==void 0).exports.default.getToken();let encodedString=typeof themeData==='string'?themeData=='light'?'agYIAhABIAE=':'agYIARABIAE=':gradientThemes[themeData];fetch("https://discord.com/api/v9/users/@me/settings-proto/1", {method: "PATCH",headers:{"Authorization":token,"Content-Type":"application/json"},body:JSON.stringify({"settings":encodedString}),}).then(res=>{res.ok?console.log("Success"):console.log("Failed");})

If something doesnt work then try the simpler version below which sets your theme to default dark mode

fetch("https://discord.com/api/v9/users/@me/settings-proto/1",{method:"PATCH",headers:{"Authorization":(webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m).find(m=>m?.exports?.default?.getToken!==void 0).exports.default.getToken(),"Content-Type":"application/json"},body:JSON.stringify({"settings":"ahEIARABIAEyCQoHY29tcGFjdA=="}),}).then(res=>{res.ok?console.log("Success"):console.log("Failed");})

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:

fetch("https://discord.com/api/v9/users/@me/settings-proto/1",{method:"PATCH",headers:{"Authorization":(webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m).find(m=>m?.exports?.default?.getToken!==void 0).exports.default.getToken(),"Content-Type":"application/json"},body:JSON.stringify({"settings":"ag8IARABMgkKB2NvbXBhY3Q="}),}).then(res=>{res.ok?console.log("Success"):console.log("Failed");})
@Miststorm
Copy link

Yup. Discord's killed it.

@LucasDiscordCzech
Copy link

LucasDiscordCzech commented Feb 9, 2024

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! 👍

@pekempy
Copy link

pekempy commented Feb 9, 2024

Vendetta is abandoned now so pretty useless suggesting it since that'll break soon

@nxriv
Copy link

nxriv commented Feb 9, 2024

For those on IOS, you can (for now) utilize this https://github.com/qnblackcat/How-to-Downgrade-apps-on-AppStore-with-iTunes-and-Charles-Proxy/ and downgrade to the version with the build number 859426640

@No767
Copy link

No767 commented Feb 9, 2024

Honestly I have no clue why this group is so against the new changes. I guess some people are just so stubborn and reluctant to oblige to new UI changes. If the new UI changes is something you hate, then why use the mobile client to begin with?

Don't flame me in the comments section btw

@No767
Copy link

No767 commented Feb 9, 2024

If you are so inclined to, just downgrade your version to < 208

@nxriv
Copy link

nxriv commented Feb 9, 2024

Honestly I have no clue why this group is so against the new changes. I guess some people are just so stubborn and reluctant to oblige to new UI changes. If the new UI changes is something you hate, then why use the mobile client to begin with?

Don't flame me in the comments section btw

I use the mobile client for convenience. For me though, I do not like the swipe to reply (I much prefer swiping to see member list) and I’m also not a fan of the new messages tab. I found it to be a worse user experience for me. There’s other reasons for other people, but I’m just sharing my own personal ones.

@ks00908
Copy link

ks00908 commented Feb 9, 2024

Honestly I have no clue why this group is so against the new changes. I guess some people are just so stubborn and reluctant to oblige to new UI changes. If the new UI changes is something you hate, then why use the mobile client to begin with?

Don't flame me in the comments section btw

New mobile experienec is genuinely miserable as someone who use discord mainly on phone
and new colors legitimately cause me headache

@No767
Copy link

No767 commented Feb 9, 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

@SnivyFilms
Copy link

Honestly I have no clue why this group is so against the new changes. I guess some people are just so stubborn and reluctant to oblige to new UI changes. If the new UI changes is something you hate, then why use the mobile client to begin with?

Don't flame me in the comments section btw

Yeah you're getting flamed because this is a moment of complete smooth brainness.
The old ui was more in line with what discord desktop is currently, and there's going to be a LOT of comparisons.
DMs, now there's a dedicated tab at the bottom to read dms instead of clicking the users icon above the servers list. Awkward change.
Swipe to reply. There are so many cases where you might swipe right too many times and, in the past, it was useful, showing the members list, allowing you to search server, etc. All that functionality is now relegated to clicking the channel name, again a step away from the desktop discord version. All for a swipe to reply, something you dont do all too often
Changing your settings, oh god I can go on about this one. I genuinely spent half an hour trying to find settings. You go to your profile and click that gear where your banner/color is (depending on if you have nitro or not), I GENIUNELY BELIEVED THAT WAS TO JUST CHANGE THE BANNER. That is horrific UI design, especially where the old one was just scrolling down and boom all you needed right there. I'll even attach what I have to prove my point image doesn't that look at first glance that would just change something in regard to the banner?
The discord server channels. Why oh why are the text channels now Aa and not #, especially when private channels still have # with the padlock on it. They were going to change it make it consistent.

That's the issue, right there, the new discord mobile layout is becoming less consistent compared to the desktop experience.

@No767
Copy link

No767 commented Feb 9, 2024

@SnivyFilms keep your ego away from me. we can discuss this in a civil manner, or I'll just report you

Also you trying to flame me and nitpick on the details isn't going to get you anywhere. And also please refrain from trying to harass me again or else I will file the necessary paperwork to open an investigation for harassment

@VampireChicken12
Copy link

@No767 It's not an ego, just common sense to change the mobile ui so drastically was a mistake.

@No767
Copy link

No767 commented Feb 9, 2024

@VampireChicken12 I can understand your position, but it is an change that you can't really fight against. People will eventually just get used to it. Besides, I do agree that the initial rollout wasn't the best but the UI has received changes and improvements. You are always free to suggest further improvements to Discord directly

@kairusds
Copy link

kairusds commented Feb 9, 2024

@VampireChicken12 I can understand your position, but it is an change that you can't really fight against. People will eventually just get used to it. Besides, I do agree that the initial rollout wasn't the best but the UI has received changes and improvements. You are always free to suggest further improvements to Discord directly

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.

@SnivyFilms
Copy link

SnivyFilms commented Feb 9, 2024

@No767 It's not an ego, just common sense to change the mobile ui so drastically was a mistake.

This

@SnivyFilms keep your ego away from me. we can discuss this in a civil manner, or I'll just report you

You asked not to get flamed after calling everyone who doesn't like the new change stubborn, as seen here (this isn't an ego attack, this is stating what you said)

Honestly I have no clue why this group is so against the new changes. I guess some people are just so stubborn and reluctant to oblige to new UI changes. If the new UI changes is something you hate, then why use the mobile client to begin with?

in fact if you like it so much explain why, I explained why I didn't like the change. So go ahead, knock down my arguments on why the new change is bad.
Infact I'll add more to knock down the reason people use the mobile client. Traveling, people travel for work, school, for pleasure, etc., They may not have access to their computer at that specific time and want to check in on friends and the like to see what's going on. Wouldn't it be logical to keep the experiences between desktop and mobile discord relatively the same?
Parity is the word, across platforms the experience should be the same (or as close as possible), and that's what I don't like with discord changing the ui, it ruins the parity.

@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