Giter VIP home page Giter VIP logo

lightcordextension's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.