Skip to content

Instantly share code, notes, and snippets.

@retronbv
Last active July 7, 2021 23:16
Show Gist options
  • Save retronbv/343448a07ab355c45214841a7c9bc316 to your computer and use it in GitHub Desktop.
Save retronbv/343448a07ab355c45214841a7c9bc316 to your computer and use it in GitHub Desktop.
How to get old discord branding back

CTRL + SHIFT + J

webpackJsonp.push([[999],{"l":(m,e,r)=>{for(k in r.c)(m=r.c[k].exports)&&m.default&&m.default.isDeveloper==0&&Object.defineProperty(m.default,"isDeveloper",{get:()=>1})}},[["l"]]]);

paste in console

settings > experiments

search "product"

select "treatment 1" for "product rebrand"

BOOM! you have the old discord colors, font, and icon back

@markverb1
Copy link

[ping removed] XAN WAS THE ORIGINAL FINDER OF THE EXPERIMENT CODE (only they used different code) SO CREDIT THEM

They were not the original finder of the code. And I should not credit them for my own findings

@retronbv Well, they were the finder of this code which does the same thing:

const DI = window.DiscordInternals;
const hasLib = !!(DI && DI.versionCompare && DI.versionCompare(DI.version || "", "1.9") >= 0);
    const WebpackModules = hasLib && DI.WebpackModules || (() => {
 
        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 = false} = 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) {
                let m = req(i);
                if (m && m.__esModule && m.default && filter(m.default))
                    return m.default;
                if (m && filter(m))
                    return m;
            }
            console.warn('Cannot find module');
            return null;
        };
        const findByUniqueProperties = (propNames, options) => find(module => propNames.every(prop => module[prop] !== undefined), options);
        const findByDisplayName = (displayName, options) => find(module => module.displayName === displayName, options);
        return {find, findByUniqueProperties, findByDisplayName};
    })();
t = WebpackModules.findByUniqueProperties(["isDeveloper"]);
Object.defineProperty(t,"isDeveloper",{get:_=>1,set:_=>_,configurable:true});

I bet you they didn’t actually find that code, they probably got it from a YouTube video or a website.

Lmao now we're bragging about finding code, not writing it?

yes lmfao

Copy link

ghost commented Jun 25, 2021

This no longer works....

@retronbv
Copy link
Author

This no longer works....

Really? :(

Copy link

ghost commented Jun 26, 2021

This no longer works....

Really? :(

Yes, Discord removed this from experiments.

Copy link

ghost commented Jun 26, 2021

This no longer works....

Really? :(

Yes, Discord removed this from experiments.

@Sly-Little-Fox Yea they did

Copy link

ghost commented Jun 26, 2021

[ping removed] XAN WAS THE ORIGINAL FINDER OF THE EXPERIMENT CODE (only they used different code) SO CREDIT THEM

They were not the original finder of the code. And I should not credit them for my own findings

@retronbv Well, they were the finder of this code which does the same thing:

const DI = window.DiscordInternals;
const hasLib = !!(DI && DI.versionCompare && DI.versionCompare(DI.version || "", "1.9") >= 0);
    const WebpackModules = hasLib && DI.WebpackModules || (() => {
 
        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 = false} = 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) {
                let m = req(i);
                if (m && m.__esModule && m.default && filter(m.default))
                    return m.default;
                if (m && filter(m))
                    return m;
            }
            console.warn('Cannot find module');
            return null;
        };
        const findByUniqueProperties = (propNames, options) => find(module => propNames.every(prop => module[prop] !== undefined), options);
        const findByDisplayName = (displayName, options) => find(module => module.displayName === displayName, options);
        return {find, findByUniqueProperties, findByDisplayName};
    })();
t = WebpackModules.findByUniqueProperties(["isDeveloper"]);
Object.defineProperty(t,"isDeveloper",{get:_=>1,set:_=>_,configurable:true});

I bet you they didn’t actually find that code, they probably got it from a YouTube video or a website.

@retronbv I don't think so

@retronbv
Copy link
Author

retronbv commented Jul 6, 2021

@thecrewmate876 ask him

@Explosion-Scratch
Copy link

This no longer works....

Really? :(

Yes, Discord removed this from experiments.

NOOOOOOOO

@retronbv
Copy link
Author

retronbv commented Jul 6, 2021

This no longer works....

Really? :(

Yes, Discord removed this from experiments.

NOOOOOOOO

You can still get the blurple back

@markverb1
Copy link

markverb1 commented Jul 7, 2021 via email

@retronbv
Copy link
Author

retronbv commented Jul 7, 2021

but didn't they remove the experiment?
Screenshot 2021-07-07 6 00 43 PM

@Explosion-Scratch
Copy link

but didn't they remove the experiment?
Screenshot 2021-07-07 6 00 43 PM

😏 saturation at 40%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment