Skip to content

Instantly share code, notes, and snippets.

@XiaoPanPanKevinPan
Last active April 9, 2025 08:47
Show Gist options
  • Save XiaoPanPanKevinPan/3cceb1d84ea97c04fe17ad087df8def6 to your computer and use it in GitHub Desktop.
Save XiaoPanPanKevinPan/3cceb1d84ea97c04fe17ad087df8def6 to your computer and use it in GitHub Desktop.
Vencord For Firefox (Self-built, Non-official)

Obviously, Vencord has stopped uploading their extension to addons.mozilla.org due to the long-waiting review, and they also decided not to go self-hosting. But I need to use that, therefore I decided to try build the addon.

Some packages are required to be installed in advance:

(Version numbers above are for reference only. Usually, you don't need to follow them.)

Here's what I've done:

  1. Clone the repo with git clone https://github.com/Vendicated/Vencord --depth 1 (for clarity, let's call the directory of your clone $ROOT, which should be ./Vencord relative to your current directory.)
  2. cd $ROOT (i.e. cd ./Vencord)
  3. pnpm i && pnpm run buildWeb
  4. cd $ROOT/dist
  5. Change the ID to vencord-firefox@sth in $ROOT/dist/firefox-unpacked/manifest.json. (Sorry for my terrible and thoughtless naming flavour 😓.) If you ever need to do it yourself, make sure your ID is unique (i.e. different from my ID, and different from any existing extension signed by mozilla).
  6. Sign the addon with web-ext sign -s $ROOT/dist/firefox-unpacked --channel=unlisted --api-key=... --api-secret=.... The fields left empty can be acquired from here (you need to have a Mozilla account).
  7. In $ROOT/dist/web-ext-artifacts, the file with the postfix .xpi is the addon.
  8. In Firefox, open about:addons and drag-and-drop the file to install.

You can download the vencord-sth.xpi file and simply do the 8th step above. The current version is 1.11.8.

This file has been truncated, but you can view the full file.
@K4sum1
Copy link

K4sum1 commented Aug 12, 2024

The good thing about developing my own fork is that I can just undo this and fix the problem.

https://bugzilla.mozilla.org/show_bug.cgi?id=1754301

@XiaoPanPanKevinPan
Copy link
Author

@K4sum1 It'll be great if you can fix the issue! The issue has been there since the Firefox version was still officially supported. I didn't know how to fix that, and I didn't have time to figure it out, either. As a workaround, I just keep using Stylus when I need to add some styles.

More about StylusStylus is a dedicated extension for managing and automatically injecting UserStyles. It searches styles on UserStyles.world and uso.kkx.one, where there are a lot of styles for Discord available. If you need to install a style from https://betterdiscord.app/themes, it looks like we can create a new style in Stylus, and just copy the CSS Rules from the downloaded file.

BTW I created a style to minimize the sidebar on Discord, which can be re-expanded by hovering the cursor. I gonna just put the link here in case anyone is interested.

@K4sum1
Copy link

K4sum1 commented Aug 12, 2024

yoooo it still errors but it looks to be mostly working. Need to figure out why font is funny now.

image

@K4sum1
Copy link

K4sum1 commented Aug 12, 2024

So, using either r3dfox or Firefox pre-99, and disabling security.csp.enable gets it mostly working.

Just pushed the release with the feature added back.

https://github.com/Eclipse-Community/r3dfox/releases/tag/v129.0-4

@K4sum1
Copy link

K4sum1 commented Aug 13, 2024

I think the error is funny visual bug. Font was JSLibCache being funny, I have it fixed now.

So yeah the issue is CSP. Disabling it globally is not ideal, but whatever. Maybe the extension could override Discord's CSP settings to allow themes idk.

@DADA30000
Copy link

thanks for still updating it!

@Lamina022
Copy link

Thank you so much, I really need this. I hate the new Discord UI overhaul and use this plugin to revert to the old theme... It's so hard on my eyes because of the small icons :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment