-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemp.html
36 lines (34 loc) · 1.16 KB
/
temp.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Xxx</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
</head>
<body class="mat-typography">
<img id="img" alt="" width="100px" height="100px" />
<script>
const main = async () => {
const url =
"https://uxzqjwo0ye.execute-api.us-west-1.amazonaws.com/api/images/urn:nasa:pds:gbo.ast.spacewatch.survey:data:sw_1025_29.04_2005_10_28_09_33_14.003.fits?ra=61.40454&dec=18.19087&size=5.00arcmin&format=jpeg";
const response = await fetch(url);
const blob = await response.blob();
const objectUrl = URL.createObjectURL(blob);
const img = document.getElementById("img");
img.src = objectUrl;
console.log("Done");
};
main();
</script>
</body>
</html>