Skip to content

Instantly share code, notes, and snippets.

@mov-ebx
Created April 19, 2023 21:50
Show Gist options
  • Save mov-ebx/d0e0bef50d28be8a941d5ba0f615008b to your computer and use it in GitHub Desktop.
Save mov-ebx/d0e0bef50d28be8a941d5ba0f615008b to your computer and use it in GitHub Desktop.
Enables secret/experimental developer options in Discord! Go to `Settings` > `What's New`, and you'll find a ton of stuff there!
// ==UserScript==
// @name Discord Experiments Enabler
// @version 1.0
// @description Enables secret/experimental developer options in Discord! Go to `Settings` > `What's New`, and you'll find a ton of stuff there!
// @author https://github.com/mov-ebx
// @match https://*.discord.com/*
// @grant none
// @namespace https://greasyfork.org/users/1059581
// @icon https://www.google.com/s2/favicons?sz=256&domain=discord.com
// ==/UserScript==
window.addEventListener("load", function(){
let wpRequire;
window.webpackChunkdiscord_app.push([[ Math.random() ], {}, (req) => { wpRequire = req; }]);
mod = Object.values(wpRequire.c).find(x => typeof x?.exports?.Z?.isDeveloper !== "undefined");
usermod = Object.values(wpRequire.c).find(x => x?.exports?.default?.getUsers)
nodes = Object.values(mod.exports.Z._dispatcher._actionHandlers._dependencyGraph.nodes)
try {
nodes.find(x => x.name == "ExperimentStore").actionHandler["OVERLAY_INITIALIZE"]({user: {flags: 1}})
} catch (e) {}
oldGetUser = usermod.exports.default.__proto__.getCurrentUser;
usermod.exports.default.__proto__.getCurrentUser = () => ({isStaff: () => true})
nodes.find(x => x.name == "DeveloperExperimentStore").actionHandler["CONNECTION_OPEN"]()
usermod.exports.default.__proto__.getCurrentUser = oldGetUser
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment