Skip to content

Instantly share code, notes, and snippets.

@MPThLee
Last active November 14, 2025 00:01
Show Gist options
  • Select an option

  • Save MPThLee/3ccb554b9d882abc6313330e38e5dfaa to your computer and use it in GitHub Desktop.

Select an option

Save MPThLee/3ccb554b9d882abc6313330e38e5dfaa to your computer and use it in GitHub Desktop.

Revisions

  1. MPThLee revised this gist May 10, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion enableDiscordExperiments.js
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@
    * Since this code was made for discord client that almost 5 years ago, It seems like doesn't work anymore.
    * I don't want people keep arguing in the comments, i decided to remove this code.
    *
    * Note: This code is now fulfilled with Javascript comments. This code won't work even if you pasted to console. doesn't do nothing.
    * Note: This code is now fulfilled with Javascript comments. This code won't work even if you pasted to console. doesn't do anything.
    * Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#comments
    **/

  2. MPThLee revised this gist May 10, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion enableDiscordExperiments.js
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@
    * Since this code was made for discord client that almost 5 years ago, It seems like doesn't work anymore.
    * I don't want people keep arguing in the comments, i decided to remove this code.
    *
    * Note: This code is now fullfilled with Javascript comments. This code won't work even if you pasted to console. doesn't do nothing.
    * Note: This code is now fulfilled with Javascript comments. This code won't work even if you pasted to console. doesn't do nothing.
    * Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#comments
    **/

  3. MPThLee revised this gist May 10, 2022. 1 changed file with 10 additions and 44 deletions.
    54 changes: 10 additions & 44 deletions enableDiscordExperiments.js
    Original file line number Diff line number Diff line change
    @@ -1,48 +1,14 @@
    /**
    * !!!! This code doesn't work anymore !!!!
    *
    * - You can check working code on comments. I won't update this code anymore.
    *
    * - You can check working code on comments. I will not update this code anymore.
    * Also, I just decided to remove this code. You can check revisions for old code.
    * Since this code was made for discord client that almost 5 years ago, It seems like doesn't work anymore.
    * I don't want people keep arguing in the comments, i decided to remove this code.
    *
    * Note: This code is now fullfilled with Javascript comments. This code won't work even if you pasted to console. doesn't do nothing.
    * Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#comments
    **/
    (() => {
    // Extracted from Samogot's LibDiscordInternals for BetterDiscord.
    const req = typeof(webpackJsonp) === "function" ? webpackJsonp([], {
    '__extra_id__': (module, exports, req) => exports.default = req
    }, ['__extra_id__']).default : webpackJsonp.push([[], {
    '__extra_id__': (module, exports, req) => module.exports = req
    }, [['__extra_id__']]]);
    delete req.m['__extra_id__'];
    delete req.c['__extra_id__'];
    const find = (filter, options = {}) => {
    const {cacheOnly = true} = options;
    for (let i in req.c) {
    if (req.c.hasOwnProperty(i)) {
    let m = req.c[i].exports;
    if (m && m.__esModule && m.default && filter(m.default))
    return m.default;
    if (m && filter(m))
    return m;
    }
    }
    if (cacheOnly) {
    console.warn('Cannot find loaded module in cache');
    return null;
    }
    console.warn('Cannot find loaded module in cache. Loading all modules may have unexpected side effects');
    for (let i = 0; i < req.m.length; ++i) {
    try {
    let m = req(i);
    if (m && m.__esModule && m.default && filter(m.default))
    return m.default;
    if (m && filter(m))
    return m;
    }
    catch (e) {
    }
    }
    console.warn('Cannot find module');
    return null;
    };
    const findByUniqueProperties = (propNames, options) => find(module => propNames.every(prop => module[prop] !== undefined), options);
    // https://github.com/Inve1951/BetterDiscordStuff/blob/master/plugins/discordexperiments.plugin.js
    Object.defineProperty(findByUniqueProperties(["isDeveloper"]),"isDeveloper",{get:_=>1,set:_=>_,configurable:true});
    })();

    // Older gist description: Enable Discord Developer Menus in any environment except mobile app without BetterDiscord using Console.
  4. MPThLee revised this gist May 10, 2022. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions enableDiscordExperiments.js
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    /**
    * This code doesn't work anymore.
    * !!!! This code doesn't work anymore !!!!
    *
    * You can check working code on comments. I will not update this code anymore.
    * - You can check working code on comments. I will not update this code anymore.
    **/
    (() => {
    // Extracted from Samogot's LibDiscordInternals for BetterDiscord.
  5. MPThLee revised this gist May 10, 2022. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions enableDiscordExperiments.js
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,8 @@
    /**
    * This code doesn't work anymore.
    *
    * You can check working code on comments. I will not update this code anymore.
    **/
    (() => {
    // Extracted from Samogot's LibDiscordInternals for BetterDiscord.
    const req = typeof(webpackJsonp) === "function" ? webpackJsonp([], {
  6. MPThLee revised this gist Dec 16, 2018. No changes.
  7. MPThLee created this gist Dec 16, 2018.
    43 changes: 43 additions & 0 deletions enableDiscordExperiments.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,43 @@
    (() => {
    // Extracted from Samogot's LibDiscordInternals for BetterDiscord.
    const req = typeof(webpackJsonp) === "function" ? webpackJsonp([], {
    '__extra_id__': (module, exports, req) => exports.default = req
    }, ['__extra_id__']).default : webpackJsonp.push([[], {
    '__extra_id__': (module, exports, req) => module.exports = req
    }, [['__extra_id__']]]);
    delete req.m['__extra_id__'];
    delete req.c['__extra_id__'];
    const find = (filter, options = {}) => {
    const {cacheOnly = true} = options;
    for (let i in req.c) {
    if (req.c.hasOwnProperty(i)) {
    let m = req.c[i].exports;
    if (m && m.__esModule && m.default && filter(m.default))
    return m.default;
    if (m && filter(m))
    return m;
    }
    }
    if (cacheOnly) {
    console.warn('Cannot find loaded module in cache');
    return null;
    }
    console.warn('Cannot find loaded module in cache. Loading all modules may have unexpected side effects');
    for (let i = 0; i < req.m.length; ++i) {
    try {
    let m = req(i);
    if (m && m.__esModule && m.default && filter(m.default))
    return m.default;
    if (m && filter(m))
    return m;
    }
    catch (e) {
    }
    }
    console.warn('Cannot find module');
    return null;
    };
    const findByUniqueProperties = (propNames, options) => find(module => propNames.every(prop => module[prop] !== undefined), options);
    // https://github.com/Inve1951/BetterDiscordStuff/blob/master/plugins/discordexperiments.plugin.js
    Object.defineProperty(findByUniqueProperties(["isDeveloper"]),"isDeveloper",{get:_=>1,set:_=>_,configurable:true});
    })();