mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-08 08:39:59 +00:00
Expose extension file size on site download button
This commit is contained in:
@@ -193,8 +193,8 @@ h1.site-header__title {
|
||||
color: var(--blue-60);
|
||||
}
|
||||
|
||||
.app-list__app:not(.button)[data-app-size]::after {
|
||||
content: "(" attr(data-app-size) ")";
|
||||
.app-list__app:not(.button)[data-file-size]::after {
|
||||
content: "(" attr(data-file-size) ")";
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
|
||||
@@ -83,7 +83,7 @@ switch (navigator.platform) {
|
||||
function populateAppListApp (element, fileUrl, fileName, fileSize) {
|
||||
element.href = fileUrl;
|
||||
element.title = `${fileName} (${fileSize})`;
|
||||
element.dataset.appSize = fileSize;
|
||||
element.dataset.fileSize = fileSize;
|
||||
element.removeAttribute("disabled");
|
||||
}
|
||||
|
||||
@@ -105,9 +105,9 @@ function onResponse (res) {
|
||||
switch (asset.name.match(REGEX_EXT).pop()) {
|
||||
case "xpi":
|
||||
downloadExtBtn.href = asset.browser_download_url;
|
||||
downloadExtBtn.title = `${asset.name} (${formattedSize})`;
|
||||
downloadExtBtn.dataset.version = res.tag_name;
|
||||
downloadExtBtn.removeAttribute("disabled");
|
||||
downloadExtBtn.removeAttribute("title");
|
||||
break;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user