Discord Developer Mode [FIXED 2023]

Enables the discord developer settings

当前为 2023-02-20 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Discord Developer Mode [FIXED 2023]
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.4
  5. // @description Enables the discord developer settings
  6. // @author You
  7. // @license MIT
  8. // @match *://discord.com/*
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=discord.com
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. webpackChunkdiscord_app.push([
  14. [0], {}, (e) => {
  15. module = Object.values(e.c).find(x => x?.exports?.default?.getUsers).exports.default;
  16. }
  17. ]);
  18. nodes = Object.values(module._dispatcher._actionHandlers._dependencyGraph.nodes);
  19. try {
  20. nodes.find(x => x.name == "ExperimentStore").actionHandler["OVERLAY_INITIALIZE"]({
  21. user: {
  22. flags: 1
  23. }
  24. });
  25. } catch (e) {}
  26. original = [module.getCurrentUser, module.getNonImpersonatedCurrentUser];
  27. module.getCurrentUser = module.getNonImpersonatedCurrentUser = () => ({
  28. isStaff: () => true
  29. });
  30. nodes.find(x => x.name == "DeveloperExperimentStore").actionHandler["OVERLAY_INITIALIZE"]();
  31. [module.getCurrentUser, module.getNonImpersonatedCurrentUser] = original;