Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Privacy Badger blocks the Discord widget on the frontpage #968

Open
IZEDx opened this issue Apr 9, 2023 · 0 comments
Open

Privacy Badger blocks the Discord widget on the frontpage #968

IZEDx opened this issue Apr 9, 2023 · 0 comments

Comments

@IZEDx
Copy link

IZEDx commented Apr 9, 2023

const req = new XMLHttpRequest();
req.open("GET", "https://discord.com/api/guilds/817075418054000661/widget.json");
req.onload = () => {
const data = JSON.parse(req.responseText);
discord.value.name = data.name;
discord.value.invite = data.instant_invite;
discord.value.count = data.presence_count;
};
req.send();

This request is being identified as a tracker by Privacy Badger and thus blocked, resulting in the Discord Invite being unavailable. Took me a while to figure out what was causing this.

There should be a fallback to the actual discord invite link when the widget.json can't be requested.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant