DGG Embed Bans: Difference between revisions

From [STAGING] Destiny Wiki
Jump to navigation Jump to search
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() {..."
(No difference)

Revision as of 19:28, 19 July 2023

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