-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcode
26 lines (25 loc) · 1.22 KB
/
code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// ==UserScript==
// @name Discord Developer Mode [FIXED AGAIN]
// @namespace http://tampermonkey.net/
// @version 0.4
// @description Enables the discord developer settings
// @author You
// @license MIT
// @match *://discord.com/*
// @match *://ptb.discord.com/*
// @match *://canary.discord.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=discord.com
// @grant none
// ==/UserScript==
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