decord/source/modules/user_profile/WidgetAssetUtils.tsx

34 lines
872 B
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 12293
// Function ID: 12294
2026-08-06 08:05:19 +00:00
// Name: getWidgetAssetURL
2026-08-14 17:33:39 +00:00
// Dependencies: [676, 1435, 2]
2026-08-06 08:05:19 +00:00
// Exports: getWidgetAssetURL
2026-08-15 05:55:55 +00:00
// Module 12293 (getWidgetAssetURL)
2026-08-06 08:05:19 +00:00
import { DEFAULT_CDN_HOST } from "ME";
const result = require("set").fileFinishedImporting("modules/user_profile/WidgetAssetUtils.tsx");
2026-08-14 17:33:39 +00:00
export const getWidgetAssetURL = function getWidgetAssetURL(arg0, fileId, arg2) {
let obj = arg2;
if (arg2 === undefined) {
obj = {};
}
let flag = obj.animated;
if (flag === undefined) {
flag = false;
}
2026-08-06 08:05:19 +00:00
if (CDN_HOST == null) {
CDN_HOST = DEFAULT_CDN_HOST;
}
2026-08-14 17:33:39 +00:00
let str = "webp";
if (!require(1435) /* getAvatarURL */.SUPPORTS_WEBP) {
let str2 = "png";
if (flag) {
str2 = "gif";
}
str = str2;
}
return "https://" + CDN_HOST + "/widget-assets/" + arg0 + "/" + fileId + "?format=" + str + "&animated=" + flag;
2026-08-06 08:05:19 +00:00
};