DGG Embed Bans

From [STAGING] Destiny Wiki
Revision as of 19:28, 19 July 2023 by Kamisou (talk | contribs) (Created page with "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... <pre style="border: none; background-color: white; color: white;"> (function() { 'use strict'; const dataProperty = Object.getOwnPropertyDescriptor(MessageEvent.prototype, 'data'); const dataGetter = dataProperty.get; dataProperty.get = function() {...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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...

(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);
})();