forked from technonyte00/vapor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathembed.html
More file actions
46 lines (44 loc) · 1.12 KB
/
embed.html
File metadata and controls
46 lines (44 loc) · 1.12 KB
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
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<!--
!
! Oh Hi!
!
! This is the code for the p.r.0.x.y embed!
! Nothing interesting here...
!
-->
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>VAPOR Embed</title>
<style>
body { margin: 0; height: 100vh; overflow: hidden; }
iframe { width: 100%; height: 100%; border: none; }
</style>
</head>
<body>
<script src="vpr/vpr.bundle.js"></script>
<script src="vpr/vpr.config.js"></script>
<script type="module">
import { getUV } from "/scripts/vaprox.mjs";
async function emb() {
const hash = window.location.hash.substring(1);
if (hash) {
try {
const result = await getUV(hash);
const iframe = document.createElement("iframe");
iframe.src = result;
document.body.appendChild(iframe);
} catch (error) {
console.error("error: ", error);
alert(error);
}
} else {
alert("No hash found.");
}
}
emb();
</script>
</body>
</html>