Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2024-04-16 15:16:58 +08:00
commit aed4ca8fc5
9 changed files with 50 additions and 5 deletions

View file

@ -66,6 +66,7 @@ this.UpdateUtils = {
let custom = prefBranch.getCharPref(PREF_APP_UPDATE_CUSTOM, "");
let distribution = prefBranch.getCharPref(PREF_APP_DISTRIBUTION, "default");
let distributionVersion = prefBranch.getCharPref(PREF_APP_DISTRIBUTION_VERSION, "default");
let navigator = Services.appShell.hiddenDOMWindow.navigator;
let substs = [
[/%ID%/g, Services.appinfo.ID],
@ -81,7 +82,10 @@ this.UpdateUtils = {
[/%PLATFORM_VERSION%/g, Services.appinfo.platformVersion],
[/%DISTRIBUTION%/g, distribution],
[/%DISTRIBUTION_VERSION%/g, distributionVersion],
[/%LOCALE%/g, this.Locale]
[/%LOCALE%/g, this.Locale],
[/%CPU_SSE2%/g, navigator.cpuHasSSE2],
[/%CPU_AVX%/g, navigator.cpuHasAVX],
[/%CPU_AVX2%/g, navigator.cpuHasAVX2]
];
substs.forEach(([_subst, _value]) => aUpdateURL = aUpdateURL.replace(_subst, _value));