-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
53 lines (45 loc) · 1001 Bytes
/
index.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Clipgen Testing</title>
<style>
iframe {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
border: none;
}
</style>
</head>
<body>
<script type="module">
import { generate } from "/lib/index.ts";
let config = await generate({
type: 'web',
name: "S0n1c's Site",
author: 'S0n1c',
desc: 'A test webclip',
clips: [
{
name: 'S0n1c',
url: 'https://s0n1c.ca',
icon: new URL('https://s0n1c.ca/me.png'), // or an ArrayBufferLike
},
]
});
console.log(config);
let blob = new Blob([config], { type: 'text/plain' });
let url = URL.createObjectURL(blob);
let iframe = document.createElement('iframe');
iframe.src = url;
document.body.appendChild(iframe);
</script>
</body>
</html>