Skip to content

Commit

Permalink
use correct prodversion in chrome extension installer
Browse files Browse the repository at this point in the history
  • Loading branch information
Vendicated committed Dec 20, 2024
1 parent 48a9aef commit 9ccc74b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/utils/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,16 @@ export async function installExt(id: string) {
// React Devtools v4.25
// 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
// 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://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, {
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);
}

Expand Down

0 comments on commit 9ccc74b

Please sign in to comment.