Skip to content

Snazzah/LightcordExtension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lightcord Extension

The web extension to make Lightcord work.

Why do I need this?

The Cloudflare configuration for the domain discord.com now blocks out requests that do not have the proper user agent. Since browsers are strict and do not allow the modification of user agents from inside a page, this extension sets the user agent for outgoing requests from Lightcord. (and does not require the use of a backend)

Before then the CloudFlare configuration for discordapp.com did not actively block requests with the incorrect user agents, but since the use of API requests to that domain is being deprecated, this extension is now required for future versions of Lightcord.

What exactly is happening here?

  • For every request being created for discord.com from Lightcord, the User-Agent header is replaced with DiscordBot (https://lightcord.js.org 1.0.0)
  • All requests to discordapp.com from Lightcord will be redirected to discord.com.
  • The Access-Control-Allow-Headers header in every response from Discord will have user-agent appended to it, since Firefox requires it in the CORS preflight.
  • This extension also allows any request to discord.com from projects in GitHub Codespaces to work. (Since Lightcord development use GitHub Codespaces)

Installation

Google Chrome
  1. Download the repo and extract the folder somewhere for later. (you can also clone it)
  2. Type chrome://extensions in the URL bar.
  3. Turn on Developer Mode (top right) and click Load unpacked. (top left)
  4. Select the src folder inside the extracted folder.
  5. Reload Lightcord.
Firefox
  1. Download the repo and extract the folder somewhere for later. (you can also clone it)
  2. Type about:debugging#/runtime/this-firefox in the URL bar.
  3. Click Load Temporary Add-on....
  4. Select the src folder inside the extracted folder.
  5. Reload Lightcord.
Opera
  1. Download the repo and extract the folder somewhere for later. (you can also clone it)
  2. Type opera://extensions in the URL bar.
  3. Turn on Developer Mode (top right) and click Load unpacked. (top left)
  4. Select the src folder inside the extracted folder.
  5. Reload Lightcord.
Microsoft Edge
  1. Download the repo and extract the folder somewhere for later. (you can also clone it)
  2. Type edge://extensions in the URL bar.
  3. Turn on Developer Mode (bottom left) and click Load unpacked.
  4. Select the src folder inside the extracted folder.
  5. Reload Lightcord.