mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-08 08:39:59 +00:00
Ignore x86 Windows binary when populating site download buttons
This commit is contained in:
@@ -97,7 +97,10 @@ function onResponse (res) {
|
|||||||
for (const asset of res.assets) {
|
for (const asset of res.assets) {
|
||||||
const formattedSize = formatSize(asset.size);
|
const formattedSize = formatSize(asset.size);
|
||||||
|
|
||||||
switch (asset.name.match(/.*\.(.*)$/).pop()) {
|
const REGEX_EXT = /.*\.(.*)$/;
|
||||||
|
const REGEX_ARCH = /.*(x(?:86|64))\..*$/;
|
||||||
|
|
||||||
|
switch (asset.name.match(REGEX_EXT).pop()) {
|
||||||
case "xpi":
|
case "xpi":
|
||||||
downloadExtBtn.href = asset.browser_download_url;
|
downloadExtBtn.href = asset.browser_download_url;
|
||||||
downloadExtBtn.dataset.version = res.tag_name;
|
downloadExtBtn.dataset.version = res.tag_name;
|
||||||
@@ -107,6 +110,11 @@ function onResponse (res) {
|
|||||||
|
|
||||||
|
|
||||||
case "exe":
|
case "exe":
|
||||||
|
const arch = asset.name.match(REGEX_ARCH).pop();
|
||||||
|
if (arch !== "x64") {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
populateAppListApp(
|
populateAppListApp(
|
||||||
appListWinBtn, asset.browser_download_url
|
appListWinBtn, asset.browser_download_url
|
||||||
, asset.name, formattedSize);
|
, asset.name, formattedSize);
|
||||||
|
|||||||
Reference in New Issue
Block a user