figranium 0.12.1 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -674
- package/README.md +336 -336
- package/agent.js +1 -1
- package/bin/cli.js +149 -149
- package/common-utils.js +211 -211
- package/dist/assets/{favicon-DmUMR1rm.svg → favicon-DXDXzv5K.svg} +290 -290
- package/dist/assets/index-BaVlGc48.js +18 -0
- package/dist/assets/index-T2xxnq_A.css +1 -0
- package/dist/favicon.svg +290 -290
- package/dist/figranium_icon.svg +290 -290
- package/dist/figranium_logo.svg +60 -60
- package/dist/index.html +26 -26
- package/dist/novnc.html +108 -108
- package/dist/styles.css +86 -86
- package/extraction-worker.js +211 -207
- package/headful.js +584 -569
- package/html-utils.js +24 -24
- package/package.json +82 -82
- package/proxy-rotation.js +261 -261
- package/proxy-utils.js +84 -84
- package/public/favicon.svg +290 -290
- package/public/figranium_icon.svg +290 -290
- package/public/figranium_logo.svg +60 -60
- package/public/novnc.html +108 -108
- package/public/styles.css +86 -86
- package/scrape.js +389 -389
- package/scripts/postinstall.js +21 -21
- package/server.js +626 -626
- package/src/server/cron-parser.js +325 -316
- package/src/server/routes/schedules.js +171 -171
- package/src/server/scheduler.js +379 -379
- package/url-utils.js +339 -323
- package/user-agent-settings.js +76 -76
- package/dist/assets/index-C2rVEs3q.css +0 -1
- package/dist/assets/index-CvaIUcTv.js +0 -18
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
<?xml version="1.0" standalone="no"?>
|
|
2
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
|
3
|
-
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
|
4
|
-
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
|
5
|
-
width="400.000000pt" height="150.000000pt" viewBox="0 0 400.000000 150.000000"
|
|
6
|
-
preserveAspectRatio="xMidYMid meet">
|
|
7
|
-
|
|
8
|
-
<g transform="translate(0.000000,150.000000) scale(0.100000,-0.100000)"
|
|
9
|
-
fill="#FFFFFF" stroke="none">
|
|
10
|
-
<path d="M526 1059 c-24 -19 -26 -26 -26 -94 0 -41 -4 -76 -9 -80 -5 -3 -36
|
|
11
|
-
11 -69 30 -68 39 -91 43 -120 18 -32 -27 -37 -64 -12 -96 25 -31 49 -33 179
|
|
12
|
-
-16 45 6 84 9 86 7 3 -2 -50 -35 -118 -73 -172 -98 -191 -121 -146 -179 27
|
|
13
|
-
-35 65 -34 129 4 76 45 80 43 80 -45 0 -86 18 -115 69 -115 48 0 71 39 71 121
|
|
14
|
-
0 80 3 82 75 39 59 -35 97 -38 125 -10 28 28 26 71 -5 100 l-25 23 -117 -16
|
|
15
|
-
c-65 -8 -119 -14 -121 -12 -2 1 58 37 133 80 74 42 140 85 145 95 18 33 11 68
|
|
16
|
-
-16 89 -36 28 -47 27 -120 -14 -34 -19 -65 -35 -68 -35 -3 0 -6 34 -6 75 0 67
|
|
17
|
-
-3 79 -25 100 -30 30 -54 31 -89 4z"/>
|
|
18
|
-
<path d="M1410 975 c-17 -21 -5 -45 23 -45 34 0 54 25 37 45 -16 19 -44 19
|
|
19
|
-
-60 0z"/>
|
|
20
|
-
<path d="M2914 976 c-11 -28 4 -48 33 -44 22 2 28 8 28 28 0 20 -6 26 -28 28
|
|
21
|
-
-18 2 -29 -2 -33 -12z"/>
|
|
22
|
-
<path d="M1101 944 c-12 -15 -21 -41 -21 -60 0 -33 -1 -34 -40 -34 -33 0 -40
|
|
23
|
-
-3 -40 -20 0 -17 7 -20 40 -20 l39 0 3 -102 c3 -95 4 -103 23 -103 19 0 20 8
|
|
24
|
-
23 103 l3 102 54 0 c48 0 55 2 55 20 0 18 -7 20 -56 20 l-55 0 3 38 3 37 53 3
|
|
25
|
-
c44 3 52 6 52 23 0 17 -7 19 -59 19 -52 0 -62 -3 -80 -26z"/>
|
|
26
|
-
<path d="M1675 881 c-54 -23 -80 -109 -55 -185 21 -64 100 -87 145 -41 l25 24
|
|
27
|
-
0 -38 c0 -55 -18 -73 -78 -79 -42 -4 -52 -8 -52 -23 0 -16 8 -19 45 -19 52 0
|
|
28
|
-
99 21 115 49 5 11 10 85 10 165 0 139 -1 146 -20 146 -14 0 -20 -7 -21 -22 0
|
|
29
|
-
-13 -3 -17 -6 -10 -6 14 -56 42 -75 41 -7 0 -22 -4 -33 -8z m103 -58 c20 -27
|
|
30
|
-
15 -110 -8 -133 -24 -24 -67 -26 -92 -3 -27 24 -25 116 3 144 24 24 75 20 97
|
|
31
|
-
-8z"/>
|
|
32
|
-
<path d="M2023 880 c-12 -5 -26 -17 -32 -27 -10 -16 -10 -16 -11 5 0 15 -6 22
|
|
33
|
-
-20 22 -19 0 -20 -7 -20 -140 0 -133 1 -140 20 -140 18 0 20 8 22 106 3 103 4
|
|
34
|
-
108 30 127 23 17 31 19 54 9 14 -7 31 -26 37 -42 15 -41 47 -41 47 -1 0 59
|
|
35
|
-
-72 105 -127 81z"/>
|
|
36
|
-
<path d="M2281 877 c-19 -7 -41 -22 -49 -34 -14 -22 -13 -23 9 -23 13 0 33 7
|
|
37
|
-
43 15 40 31 106 5 106 -41 0 -23 -3 -24 -61 -24 -54 0 -64 -3 -90 -29 -83 -83
|
|
38
|
-
39 -192 130 -115 l31 26 0 -27 c0 -20 4 -26 18 -23 15 3 17 17 20 105 3 125
|
|
39
|
-
-9 157 -66 172 -45 13 -48 13 -91 -2z m109 -172 c0 -42 -33 -68 -81 -63 -38 4
|
|
40
|
-
-54 25 -45 61 7 28 20 34 84 36 42 1 42 1 42 -34z"/>
|
|
41
|
-
<path d="M2613 880 c-12 -5 -26 -17 -32 -27 -10 -16 -10 -16 -11 5 0 15 -6 22
|
|
42
|
-
-20 22 -19 0 -20 -7 -20 -140 0 -133 1 -140 20 -140 19 0 20 7 20 95 0 105 12
|
|
43
|
-
143 48 152 57 14 82 -32 82 -154 0 -86 1 -93 20 -93 19 0 20 7 20 114 0 105
|
|
44
|
-
-2 117 -22 140 -25 29 -72 40 -105 26z"/>
|
|
45
|
-
<path d="M3470 870 c-16 -16 -20 -17 -20 -5 0 8 -7 15 -15 15 -13 0 -15 -22
|
|
46
|
-
-15 -141 0 -128 2 -140 18 -137 15 3 18 19 22 123 5 120 5 120 30 120 l25 0 3
|
|
47
|
-
-123 c2 -110 4 -123 20 -120 15 3 18 20 22 123 5 120 5 120 30 120 l25 0 3
|
|
48
|
-
-123 c2 -110 4 -123 20 -120 15 3 17 18 17 131 0 116 -2 130 -19 143 -27 19
|
|
49
|
-
-43 18 -62 -5 -16 -18 -17 -18 -35 0 -24 24 -44 24 -69 -1z"/>
|
|
50
|
-
<path d="M1340 860 c0 -17 7 -20 40 -20 l40 0 0 -94 0 -95 -47 -3 c-40 -3 -48
|
|
51
|
-
-6 -48 -23 0 -19 8 -20 113 -23 l112 -3 0 26 c0 23 -4 25 -40 25 l-40 0 0 115
|
|
52
|
-
0 115 -65 0 c-58 0 -65 -2 -65 -20z"/>
|
|
53
|
-
<path d="M2840 860 c0 -17 7 -20 45 -20 l45 0 0 -95 0 -95 -51 0 c-47 0 -50
|
|
54
|
-
-2 -47 -22 3 -22 7 -23 116 -26 l112 -3 0 26 c0 23 -4 25 -40 25 l-40 0 0 115
|
|
55
|
-
0 115 -70 0 c-63 0 -70 -2 -70 -20z"/>
|
|
56
|
-
<path d="M3130 780 c0 -144 23 -180 116 -180 26 0 44 8 65 29 29 29 29 31 29
|
|
57
|
-
140 0 104 -1 111 -20 111 -19 0 -20 -7 -20 -98 0 -112 -13 -142 -60 -142 -51
|
|
58
|
-
0 -60 20 -60 136 l0 104 -25 0 -25 0 0 -100z"/>
|
|
59
|
-
</g>
|
|
60
|
-
</svg>
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
|
3
|
+
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
|
4
|
+
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
width="400.000000pt" height="150.000000pt" viewBox="0 0 400.000000 150.000000"
|
|
6
|
+
preserveAspectRatio="xMidYMid meet">
|
|
7
|
+
|
|
8
|
+
<g transform="translate(0.000000,150.000000) scale(0.100000,-0.100000)"
|
|
9
|
+
fill="#FFFFFF" stroke="none">
|
|
10
|
+
<path d="M526 1059 c-24 -19 -26 -26 -26 -94 0 -41 -4 -76 -9 -80 -5 -3 -36
|
|
11
|
+
11 -69 30 -68 39 -91 43 -120 18 -32 -27 -37 -64 -12 -96 25 -31 49 -33 179
|
|
12
|
+
-16 45 6 84 9 86 7 3 -2 -50 -35 -118 -73 -172 -98 -191 -121 -146 -179 27
|
|
13
|
+
-35 65 -34 129 4 76 45 80 43 80 -45 0 -86 18 -115 69 -115 48 0 71 39 71 121
|
|
14
|
+
0 80 3 82 75 39 59 -35 97 -38 125 -10 28 28 26 71 -5 100 l-25 23 -117 -16
|
|
15
|
+
c-65 -8 -119 -14 -121 -12 -2 1 58 37 133 80 74 42 140 85 145 95 18 33 11 68
|
|
16
|
+
-16 89 -36 28 -47 27 -120 -14 -34 -19 -65 -35 -68 -35 -3 0 -6 34 -6 75 0 67
|
|
17
|
+
-3 79 -25 100 -30 30 -54 31 -89 4z"/>
|
|
18
|
+
<path d="M1410 975 c-17 -21 -5 -45 23 -45 34 0 54 25 37 45 -16 19 -44 19
|
|
19
|
+
-60 0z"/>
|
|
20
|
+
<path d="M2914 976 c-11 -28 4 -48 33 -44 22 2 28 8 28 28 0 20 -6 26 -28 28
|
|
21
|
+
-18 2 -29 -2 -33 -12z"/>
|
|
22
|
+
<path d="M1101 944 c-12 -15 -21 -41 -21 -60 0 -33 -1 -34 -40 -34 -33 0 -40
|
|
23
|
+
-3 -40 -20 0 -17 7 -20 40 -20 l39 0 3 -102 c3 -95 4 -103 23 -103 19 0 20 8
|
|
24
|
+
23 103 l3 102 54 0 c48 0 55 2 55 20 0 18 -7 20 -56 20 l-55 0 3 38 3 37 53 3
|
|
25
|
+
c44 3 52 6 52 23 0 17 -7 19 -59 19 -52 0 -62 -3 -80 -26z"/>
|
|
26
|
+
<path d="M1675 881 c-54 -23 -80 -109 -55 -185 21 -64 100 -87 145 -41 l25 24
|
|
27
|
+
0 -38 c0 -55 -18 -73 -78 -79 -42 -4 -52 -8 -52 -23 0 -16 8 -19 45 -19 52 0
|
|
28
|
+
99 21 115 49 5 11 10 85 10 165 0 139 -1 146 -20 146 -14 0 -20 -7 -21 -22 0
|
|
29
|
+
-13 -3 -17 -6 -10 -6 14 -56 42 -75 41 -7 0 -22 -4 -33 -8z m103 -58 c20 -27
|
|
30
|
+
15 -110 -8 -133 -24 -24 -67 -26 -92 -3 -27 24 -25 116 3 144 24 24 75 20 97
|
|
31
|
+
-8z"/>
|
|
32
|
+
<path d="M2023 880 c-12 -5 -26 -17 -32 -27 -10 -16 -10 -16 -11 5 0 15 -6 22
|
|
33
|
+
-20 22 -19 0 -20 -7 -20 -140 0 -133 1 -140 20 -140 18 0 20 8 22 106 3 103 4
|
|
34
|
+
108 30 127 23 17 31 19 54 9 14 -7 31 -26 37 -42 15 -41 47 -41 47 -1 0 59
|
|
35
|
+
-72 105 -127 81z"/>
|
|
36
|
+
<path d="M2281 877 c-19 -7 -41 -22 -49 -34 -14 -22 -13 -23 9 -23 13 0 33 7
|
|
37
|
+
43 15 40 31 106 5 106 -41 0 -23 -3 -24 -61 -24 -54 0 -64 -3 -90 -29 -83 -83
|
|
38
|
+
39 -192 130 -115 l31 26 0 -27 c0 -20 4 -26 18 -23 15 3 17 17 20 105 3 125
|
|
39
|
+
-9 157 -66 172 -45 13 -48 13 -91 -2z m109 -172 c0 -42 -33 -68 -81 -63 -38 4
|
|
40
|
+
-54 25 -45 61 7 28 20 34 84 36 42 1 42 1 42 -34z"/>
|
|
41
|
+
<path d="M2613 880 c-12 -5 -26 -17 -32 -27 -10 -16 -10 -16 -11 5 0 15 -6 22
|
|
42
|
+
-20 22 -19 0 -20 -7 -20 -140 0 -133 1 -140 20 -140 19 0 20 7 20 95 0 105 12
|
|
43
|
+
143 48 152 57 14 82 -32 82 -154 0 -86 1 -93 20 -93 19 0 20 7 20 114 0 105
|
|
44
|
+
-2 117 -22 140 -25 29 -72 40 -105 26z"/>
|
|
45
|
+
<path d="M3470 870 c-16 -16 -20 -17 -20 -5 0 8 -7 15 -15 15 -13 0 -15 -22
|
|
46
|
+
-15 -141 0 -128 2 -140 18 -137 15 3 18 19 22 123 5 120 5 120 30 120 l25 0 3
|
|
47
|
+
-123 c2 -110 4 -123 20 -120 15 3 18 20 22 123 5 120 5 120 30 120 l25 0 3
|
|
48
|
+
-123 c2 -110 4 -123 20 -120 15 3 17 18 17 131 0 116 -2 130 -19 143 -27 19
|
|
49
|
+
-43 18 -62 -5 -16 -18 -17 -18 -35 0 -24 24 -44 24 -69 -1z"/>
|
|
50
|
+
<path d="M1340 860 c0 -17 7 -20 40 -20 l40 0 0 -94 0 -95 -47 -3 c-40 -3 -48
|
|
51
|
+
-6 -48 -23 0 -19 8 -20 113 -23 l112 -3 0 26 c0 23 -4 25 -40 25 l-40 0 0 115
|
|
52
|
+
0 115 -65 0 c-58 0 -65 -2 -65 -20z"/>
|
|
53
|
+
<path d="M2840 860 c0 -17 7 -20 45 -20 l45 0 0 -95 0 -95 -51 0 c-47 0 -50
|
|
54
|
+
-2 -47 -22 3 -22 7 -23 116 -26 l112 -3 0 26 c0 23 -4 25 -40 25 l-40 0 0 115
|
|
55
|
+
0 115 -70 0 c-63 0 -70 -2 -70 -20z"/>
|
|
56
|
+
<path d="M3130 780 c0 -144 23 -180 116 -180 26 0 44 8 65 29 29 29 29 31 29
|
|
57
|
+
140 0 104 -1 111 -20 111 -19 0 -20 -7 -20 -98 0 -112 -13 -142 -60 -142 -51
|
|
58
|
+
0 -60 20 -60 136 l0 104 -25 0 -25 0 0 -100z"/>
|
|
59
|
+
</g>
|
|
60
|
+
</svg>
|
package/public/novnc.html
CHANGED
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta
|
|
6
|
-
name="viewport"
|
|
7
|
-
content="width=device-width, initial-scale=1, maximum-scale=1"
|
|
8
|
-
/>
|
|
9
|
-
<title>Headful Browser</title>
|
|
10
|
-
<style>
|
|
11
|
-
:root {
|
|
12
|
-
color-scheme: dark;
|
|
13
|
-
}
|
|
14
|
-
html,
|
|
15
|
-
body {
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: 100%;
|
|
18
|
-
margin: 0;
|
|
19
|
-
background: #050505;
|
|
20
|
-
overflow: hidden;
|
|
21
|
-
font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
|
|
22
|
-
}
|
|
23
|
-
#screen {
|
|
24
|
-
width: 100%;
|
|
25
|
-
height: 100%;
|
|
26
|
-
}
|
|
27
|
-
#status {
|
|
28
|
-
position: absolute;
|
|
29
|
-
top: 12px;
|
|
30
|
-
left: 12px;
|
|
31
|
-
background: rgba(0, 0, 0, 0.6);
|
|
32
|
-
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
33
|
-
padding: 6px 10px;
|
|
34
|
-
border-radius: 10px;
|
|
35
|
-
font-size: 11px;
|
|
36
|
-
letter-spacing: 0.08em;
|
|
37
|
-
text-transform: uppercase;
|
|
38
|
-
color: #d1d5db;
|
|
39
|
-
pointer-events: none;
|
|
40
|
-
}
|
|
41
|
-
#status.hidden {
|
|
42
|
-
display: none;
|
|
43
|
-
}
|
|
44
|
-
</style>
|
|
45
|
-
</head>
|
|
46
|
-
<body>
|
|
47
|
-
<div id="status">Connecting...</div>
|
|
48
|
-
<div id="screen"></div>
|
|
49
|
-
<script type="module">
|
|
50
|
-
import RFB from '/novnc/core/rfb.js';
|
|
51
|
-
|
|
52
|
-
const params = new URLSearchParams(window.location.search);
|
|
53
|
-
const host = params.get('host') || window.location.hostname;
|
|
54
|
-
const port = params.get('port') || window.location.port;
|
|
55
|
-
const rawPath = params.get('path') || 'websockify';
|
|
56
|
-
const path = rawPath.replace(/^\/+/, '');
|
|
57
|
-
const proto = window.location.protocol === 'https:' ? 'wss' : 'ws';
|
|
58
|
-
const hostPort = port ? `${host}:${port}` : host;
|
|
59
|
-
const wsUrl = `${proto}://${hostPort}/${path}`;
|
|
60
|
-
|
|
61
|
-
const statusEl = document.getElementById('status');
|
|
62
|
-
const screen = document.getElementById('screen');
|
|
63
|
-
const rfb = new RFB(screen, wsUrl);
|
|
64
|
-
rfb.scaleViewport = true;
|
|
65
|
-
rfb.resizeSession = true;
|
|
66
|
-
rfb.showDotCursor = false;
|
|
67
|
-
rfb.clipViewport = false;
|
|
68
|
-
|
|
69
|
-
const sendKey = (keysym, code, down) => {
|
|
70
|
-
if (typeof rfb.sendKey !== 'function') return;
|
|
71
|
-
try {
|
|
72
|
-
rfb.sendKey(keysym, code, down);
|
|
73
|
-
} catch (err) {
|
|
74
|
-
// ignore
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
const clearModifiers = () => {
|
|
79
|
-
const modifiers = [
|
|
80
|
-
[0xFFE1, 'ShiftLeft'],
|
|
81
|
-
[0xFFE2, 'ShiftRight'],
|
|
82
|
-
[0xFFE3, 'ControlLeft'],
|
|
83
|
-
[0xFFE4, 'ControlRight'],
|
|
84
|
-
[0xFFE9, 'AltLeft'],
|
|
85
|
-
[0xFFEA, 'AltRight'],
|
|
86
|
-
[0xFFE7, 'MetaLeft'],
|
|
87
|
-
[0xFFE8, 'MetaRight']
|
|
88
|
-
];
|
|
89
|
-
modifiers.forEach(([keysym, code]) => sendKey(keysym, code, false));
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
window.addEventListener('focus', () => {
|
|
93
|
-
clearModifiers();
|
|
94
|
-
});
|
|
95
|
-
window.addEventListener('blur', () => {
|
|
96
|
-
clearModifiers();
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
rfb.addEventListener('connect', () => {
|
|
100
|
-
statusEl.classList.add('hidden');
|
|
101
|
-
});
|
|
102
|
-
rfb.addEventListener('disconnect', () => {
|
|
103
|
-
statusEl.classList.remove('hidden');
|
|
104
|
-
statusEl.textContent = 'Disconnected';
|
|
105
|
-
});
|
|
106
|
-
</script>
|
|
107
|
-
</body>
|
|
108
|
-
</html>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta
|
|
6
|
+
name="viewport"
|
|
7
|
+
content="width=device-width, initial-scale=1, maximum-scale=1"
|
|
8
|
+
/>
|
|
9
|
+
<title>Headful Browser</title>
|
|
10
|
+
<style>
|
|
11
|
+
:root {
|
|
12
|
+
color-scheme: dark;
|
|
13
|
+
}
|
|
14
|
+
html,
|
|
15
|
+
body {
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
margin: 0;
|
|
19
|
+
background: #050505;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
|
|
22
|
+
}
|
|
23
|
+
#screen {
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
}
|
|
27
|
+
#status {
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 12px;
|
|
30
|
+
left: 12px;
|
|
31
|
+
background: rgba(0, 0, 0, 0.6);
|
|
32
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
33
|
+
padding: 6px 10px;
|
|
34
|
+
border-radius: 10px;
|
|
35
|
+
font-size: 11px;
|
|
36
|
+
letter-spacing: 0.08em;
|
|
37
|
+
text-transform: uppercase;
|
|
38
|
+
color: #d1d5db;
|
|
39
|
+
pointer-events: none;
|
|
40
|
+
}
|
|
41
|
+
#status.hidden {
|
|
42
|
+
display: none;
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
45
|
+
</head>
|
|
46
|
+
<body>
|
|
47
|
+
<div id="status">Connecting...</div>
|
|
48
|
+
<div id="screen"></div>
|
|
49
|
+
<script type="module">
|
|
50
|
+
import RFB from '/novnc/core/rfb.js';
|
|
51
|
+
|
|
52
|
+
const params = new URLSearchParams(window.location.search);
|
|
53
|
+
const host = params.get('host') || window.location.hostname;
|
|
54
|
+
const port = params.get('port') || window.location.port;
|
|
55
|
+
const rawPath = params.get('path') || 'websockify';
|
|
56
|
+
const path = rawPath.replace(/^\/+/, '');
|
|
57
|
+
const proto = window.location.protocol === 'https:' ? 'wss' : 'ws';
|
|
58
|
+
const hostPort = port ? `${host}:${port}` : host;
|
|
59
|
+
const wsUrl = `${proto}://${hostPort}/${path}`;
|
|
60
|
+
|
|
61
|
+
const statusEl = document.getElementById('status');
|
|
62
|
+
const screen = document.getElementById('screen');
|
|
63
|
+
const rfb = new RFB(screen, wsUrl);
|
|
64
|
+
rfb.scaleViewport = true;
|
|
65
|
+
rfb.resizeSession = true;
|
|
66
|
+
rfb.showDotCursor = false;
|
|
67
|
+
rfb.clipViewport = false;
|
|
68
|
+
|
|
69
|
+
const sendKey = (keysym, code, down) => {
|
|
70
|
+
if (typeof rfb.sendKey !== 'function') return;
|
|
71
|
+
try {
|
|
72
|
+
rfb.sendKey(keysym, code, down);
|
|
73
|
+
} catch (err) {
|
|
74
|
+
// ignore
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const clearModifiers = () => {
|
|
79
|
+
const modifiers = [
|
|
80
|
+
[0xFFE1, 'ShiftLeft'],
|
|
81
|
+
[0xFFE2, 'ShiftRight'],
|
|
82
|
+
[0xFFE3, 'ControlLeft'],
|
|
83
|
+
[0xFFE4, 'ControlRight'],
|
|
84
|
+
[0xFFE9, 'AltLeft'],
|
|
85
|
+
[0xFFEA, 'AltRight'],
|
|
86
|
+
[0xFFE7, 'MetaLeft'],
|
|
87
|
+
[0xFFE8, 'MetaRight']
|
|
88
|
+
];
|
|
89
|
+
modifiers.forEach(([keysym, code]) => sendKey(keysym, code, false));
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
window.addEventListener('focus', () => {
|
|
93
|
+
clearModifiers();
|
|
94
|
+
});
|
|
95
|
+
window.addEventListener('blur', () => {
|
|
96
|
+
clearModifiers();
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
rfb.addEventListener('connect', () => {
|
|
100
|
+
statusEl.classList.add('hidden');
|
|
101
|
+
});
|
|
102
|
+
rfb.addEventListener('disconnect', () => {
|
|
103
|
+
statusEl.classList.remove('hidden');
|
|
104
|
+
statusEl.textContent = 'Disconnected';
|
|
105
|
+
});
|
|
106
|
+
</script>
|
|
107
|
+
</body>
|
|
108
|
+
</html>
|
package/public/styles.css
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
/* Figranium Shared Styles */
|
|
2
|
-
|
|
3
|
-
.glass {
|
|
4
|
-
background: rgba(10, 10, 10, 0.9);
|
|
5
|
-
backdrop-filter: blur(64px);
|
|
6
|
-
-webkit-backdrop-filter: blur(64px);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.glass-card {
|
|
10
|
-
background: rgba(255, 255, 255, 0.015);
|
|
11
|
-
backdrop-filter: blur(16px);
|
|
12
|
-
-webkit-backdrop-filter: blur(16px);
|
|
13
|
-
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
14
|
-
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.glass-card:hover {
|
|
18
|
-
background: rgba(255, 255, 255, 0.04);
|
|
19
|
-
border-color: rgba(255, 255, 255, 0.15);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.shine-effect {
|
|
23
|
-
position: relative;
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.shine-effect::after {
|
|
28
|
-
content: '';
|
|
29
|
-
position: absolute;
|
|
30
|
-
top: -50%;
|
|
31
|
-
left: -100%;
|
|
32
|
-
width: 33.333333%;
|
|
33
|
-
height: 200%;
|
|
34
|
-
background: rgba(255, 255, 255, 0.2);
|
|
35
|
-
transform: rotate(25deg);
|
|
36
|
-
pointer-events: none;
|
|
37
|
-
transition: none;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.shine-effect:hover::after {
|
|
41
|
-
left: 150%;
|
|
42
|
-
transition: left 0.7s ease-in-out;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.custom-scrollbar::-webkit-scrollbar {
|
|
46
|
-
width: 4px;
|
|
47
|
-
height: 4px;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.custom-scrollbar::-webkit-scrollbar-track {
|
|
51
|
-
background: transparent;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.custom-scrollbar::-webkit-scrollbar-thumb {
|
|
55
|
-
background: rgba(255, 255, 255, 0.1);
|
|
56
|
-
border-radius: 9999px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
|
|
60
|
-
background: rgba(255, 255, 255, 0.2);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.custom-select {
|
|
64
|
-
appearance: none;
|
|
65
|
-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-opacity='0.4'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
|
|
66
|
-
background-repeat: no-repeat;
|
|
67
|
-
background-position: right 1rem center;
|
|
68
|
-
background-size: 1em;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.custom-select option {
|
|
72
|
-
background: #0a0a0a;
|
|
73
|
-
color: white;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.action-card-item.dragging {
|
|
77
|
-
opacity: 0.5;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.action-card-item.drag-over-top {
|
|
81
|
-
border-top: 2px solid rgba(59, 130, 246, 0.5);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.action-card-item.drag-over-bottom {
|
|
85
|
-
border-bottom: 2px solid rgba(59, 130, 246, 0.5);
|
|
86
|
-
}
|
|
1
|
+
/* Figranium Shared Styles */
|
|
2
|
+
|
|
3
|
+
.glass {
|
|
4
|
+
background: rgba(10, 10, 10, 0.9);
|
|
5
|
+
backdrop-filter: blur(64px);
|
|
6
|
+
-webkit-backdrop-filter: blur(64px);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.glass-card {
|
|
10
|
+
background: rgba(255, 255, 255, 0.015);
|
|
11
|
+
backdrop-filter: blur(16px);
|
|
12
|
+
-webkit-backdrop-filter: blur(16px);
|
|
13
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
14
|
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.glass-card:hover {
|
|
18
|
+
background: rgba(255, 255, 255, 0.04);
|
|
19
|
+
border-color: rgba(255, 255, 255, 0.15);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.shine-effect {
|
|
23
|
+
position: relative;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.shine-effect::after {
|
|
28
|
+
content: '';
|
|
29
|
+
position: absolute;
|
|
30
|
+
top: -50%;
|
|
31
|
+
left: -100%;
|
|
32
|
+
width: 33.333333%;
|
|
33
|
+
height: 200%;
|
|
34
|
+
background: rgba(255, 255, 255, 0.2);
|
|
35
|
+
transform: rotate(25deg);
|
|
36
|
+
pointer-events: none;
|
|
37
|
+
transition: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.shine-effect:hover::after {
|
|
41
|
+
left: 150%;
|
|
42
|
+
transition: left 0.7s ease-in-out;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.custom-scrollbar::-webkit-scrollbar {
|
|
46
|
+
width: 4px;
|
|
47
|
+
height: 4px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.custom-scrollbar::-webkit-scrollbar-track {
|
|
51
|
+
background: transparent;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.custom-scrollbar::-webkit-scrollbar-thumb {
|
|
55
|
+
background: rgba(255, 255, 255, 0.1);
|
|
56
|
+
border-radius: 9999px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
|
|
60
|
+
background: rgba(255, 255, 255, 0.2);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.custom-select {
|
|
64
|
+
appearance: none;
|
|
65
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-opacity='0.4'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
|
|
66
|
+
background-repeat: no-repeat;
|
|
67
|
+
background-position: right 1rem center;
|
|
68
|
+
background-size: 1em;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.custom-select option {
|
|
72
|
+
background: #0a0a0a;
|
|
73
|
+
color: white;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.action-card-item.dragging {
|
|
77
|
+
opacity: 0.5;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.action-card-item.drag-over-top {
|
|
81
|
+
border-top: 2px solid rgba(59, 130, 246, 0.5);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.action-card-item.drag-over-bottom {
|
|
85
|
+
border-bottom: 2px solid rgba(59, 130, 246, 0.5);
|
|
86
|
+
}
|