1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-09 09:26:22 +00:00

use correct prodversion in chrome extension installer

This commit is contained in:
Vendicated 2024-12-20 15:06:19 +01:00
parent 48a9aef2eb
commit 9ccc74bde3
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -71,13 +71,16 @@ export async function installExt(id: string) {
// React Devtools v4.25 // React Devtools v4.25
// v4.27 is broken in Electron, see https://github.com/facebook/react/issues/25843 // v4.27 is broken in Electron, see https://github.com/facebook/react/issues/25843
// Unfortunately, Google does not serve old versions, so this is the only way // Unfortunately, Google does not serve old versions, so this is the only way
// This zip file is pinned to long commit hash so it cannot be changed remotely
? "https://raw.githubusercontent.com/Vendicated/random-files/f6f550e4c58ac5f2012095a130406c2ab25b984d/fmkadmapgofadopljbjfkapdkoienihi.zip" ? "https://raw.githubusercontent.com/Vendicated/random-files/f6f550e4c58ac5f2012095a130406c2ab25b984d/fmkadmapgofadopljbjfkapdkoienihi.zip"
: `https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&x=id%3D${id}%26uc&prodversion=32`; : `https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&x=id%3D${id}%26uc&prodversion=${process.versions.chrome}`;
const buf = await get(url, { const buf = await get(url, {
headers: { headers: {
"User-Agent": "Vencord (https://github.com/Vendicated/Vencord)" "User-Agent": `Electron ${process.versions.electron} ~ Vencord (https://github.com/Vendicated/Vencord)`
} }
}); });
await extract(crxToZip(buf), extDir).catch(console.error); await extract(crxToZip(buf), extDir).catch(console.error);
} }