DGG Embed Bans

From [STAGING] Destiny Wiki
Jump to navigation Jump to search

In July 2023 a policy was introduced in DGG blocking Destiny's livestream embeds with the objective of increasing Kick.com online chat engagement.

There are currently no workarounds for the embed block BINGQILING

(function() {
    'use strict';

    const dataProperty = Object.getOwnPropertyDescriptor(MessageEvent.prototype, 'data');
    const dataGetter = dataProperty.get;

    dataProperty.get = function() {
        let data = dataGetter.call(this);

        if (!this.target instanceof WebSocket) {
            return data;
        }

        const json = JSON.parse(data);

        switch (json.type) {
            case 'dggApi:bannedEmbeds':
                json.data = [];
                data = JSON.stringify(json);
                break;
        }

        return data;
    }

    Object.defineProperty(MessageEvent.prototype, 'data', dataProperty);
})();