-
-
Save MeguminSama/2cae24c9e4c335c661fa94e72235d4c4 to your computer and use it in GitHub Desktop.
let cache; webpackChunkdiscord_app.push([["wp_isdev_patch"], {}, r => cache=r.c]); | |
var UserStore = Object.values(cache).find(m => m?.exports?.default?.getUser).exports.default; | |
var actions = Object.values(UserStore._dispatcher._actionHandlers._dependencyGraph.nodes); | |
var user = UserStore.getCurrentUser(); | |
actions.find(n => n.name === "ExperimentStore").actionHandler.CONNECTION_OPEN({ | |
type: "CONNECTION_OPEN", user: {flags: user.flags |= 1}, experiments: [], | |
}); | |
actions.find(n => n.name === "DeveloperExperimentStore").actionHandler.CONNECTION_OPEN(); | |
webpackChunkdiscord_app.pop(); user.flags &= ~1; "done"; |
@Zyrenth thanks for the patch. Gist has been updated.
very h
works as of may 2024
Another patch because we love discord: (as of writing this the update is only pushed to canary and ptb)
This is still working, but if you're on linux and you're using wayland don't use this if you intend to stream since it breaks the new wayland screensharing tool.
I think it has something to do with it being some experiment that gets disabled by this snippet, but I couldn't get to the specific reason at 3AM.
I bisected the script and it happens after running the first actions.find, if someone that knows how discord works wants to help figure out a fix it would be great.
it could be worth grabbing the current experiments list and reinserting that into the CONNECTION_OPEN payload
Another patch because we love discord:
(as of writing this the update is only pushed to canary and ptb)