(url: string)
| 1202 | } |
| 1203 | |
| 1204 | function applyEmbedProxy(url: string): string { |
| 1205 | if (!settings.store.embedProxyEnabled) { |
| 1206 | return url; |
| 1207 | } |
| 1208 | |
| 1209 | const service = getEmbedProxyService(); |
| 1210 | if (!shouldProxyEmbedUrl(url)) { |
| 1211 | return url; |
| 1212 | } |
| 1213 | |
| 1214 | switch (service) { |
| 1215 | case "cors": |
| 1216 | return toProxyUrl(url); |
| 1217 | case "nfp": |
| 1218 | return `https://discord.nfp.is/?v=${encodeURIComponent(url)}`; |
| 1219 | default: |
| 1220 | return toProxyUrl(url); |
| 1221 | } |
| 1222 | } |
| 1223 | |
| 1224 | function isExeFileName(fileName: string): boolean { |
| 1225 | return fileName.toLowerCase().endsWith(".exe"); |
no test coverage detected