Spaces:
Running
Running
Download shared/imageIdentity.ts from Felladrin/MiniSearch: direct link, hf CLI and curl.
- Browser
- Download file 505 Bytes
-
https://huggingface.co/spaces/Felladrin/MiniSearch/resolve/main/shared/imageIdentity.ts
- Command line
-
hf download hf://spaces/Felladrin/MiniSearch/shared/imageIdentity.ts
-
curl -L -o imageIdentity.ts https://huggingface.co/spaces/Felladrin/MiniSearch/resolve/main/shared/imageIdentity.ts
505 Bytes
| /** | |
| * What makes an image or video result distinct: its full-size source, then its | |
| * thumbnail, then its page. The page alone is not enough, since one gallery page | |
| * holds many different images. The server, the screen and the history all | |
| * identify image results through this, so they agree on what counts as one. | |
| */ | |
| export function getImageIdentity( | |
| sourceUrl: string | undefined, | |
| thumbnailUrl: string | undefined, | |
| pageUrl: string, | |
| ): string { | |
| return sourceUrl || thumbnailUrl || pageUrl; | |
| } | |