-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbrowser.html
executable file
·46 lines (43 loc) · 915 Bytes
/
browser.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
<!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></title>
<link rel="stylesheet" href="ui.css">
</head>
<body>
<style>
body{
position: fixed;
padding: 0;
margin: 0;
}
#flex {
display: flex;
flex-direction: column;
height: 100vh;
}
iframe {
width: 100vw;
flex: 0 1 100vh;
}
</style>
<div id=flex>
<input type="text" style="font-family: monospace;" name="" id="url" value="">
<iframe id="i" frameborder="0" style="background-color: #fff;"></iframe>
</div>
<script>
setTimeout(() => {
if ((window.arg || '').startsWith("$open ")) {
i.src = url.value = window.arg.slice(6)
}
url.onkeypress = (ev) => {
if((ev.code||ev.key)!="Enter")return;
i.src=url.value
}
}, 100)
</script>
</body>
</html>