-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathiview_splash.hta
More file actions
89 lines (87 loc) · 3.94 KB
/
Copy pathiview_splash.hta
File metadata and controls
89 lines (87 loc) · 3.94 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>iGMT</title>
<HTA:APPLICATION
ID="igmtSplash"
APPLICATIONNAME="iGMT"
BORDER="none"
CAPTION="no"
SHOWINTASKBAR="no"
SINGLEINSTANCE="yes"
SYSMENU="no"
MAXIMIZEBUTTON="no"
MINIMIZEBUTTON="no"
SCROLL="no"
SELECTION="no"
WINDOWSTATE="normal"
NAVIGABLE="no"
CONTEXTMENU="no"
/>
<script language="JScript">
// Resize+move as early as possible (before CSS/image load) to minimize the on-screen time at
// the wrong geometry. Body stays hidden (visibility:hidden below) until onload, so there is no
// visible content mismatch in between. Size is a fraction of the real screen, not a fixed guess.
var W = Math.round(screen.availWidth * 0.30);
if (W < 520) W = 520;
var H = Math.round(W * 0.68);
window.resizeTo(W, H);
window.moveTo(Math.round((screen.availWidth - W) / 2), Math.round((screen.availHeight - H) / 2));
</script>
<style>
/* The crystal-ball nebula fills the splash as a BACKGROUND: `cover` scales it to the window and
crops the overflow, so the window keeps the size set in script above (a fraction of the screen)
instead of being dictated by the image's own pixel size. The dark colour underneath shows only
if the file is missing. JPEG, not the original .webp: an HTA renders in MSHTML, which cannot
decode WebP — it would have shown nothing at all. */
html, body { margin:0; padding:0; overflow:hidden; color:#e0e0e0;
background:#0a0d18 url("crystalball.jpg") center center no-repeat;
background-size:cover;
font-family:"Segoe UI",Tahoma,sans-serif; width:100%; height:100%; }
#wrap { position:relative; width:100%; height:100%; display:flex; flex-direction:column;
align-items:center; justify-content:center; border:1px solid #444; box-sizing:border-box; }
/* The icon sits in the UPPER-LEFT corner, not in the centred column: taken out of the flex flow
with absolute positioning so the caption and the progress bar stay centred as they were. */
/* PIXELS, not vh: this file has no DOCTYPE, so MSHTML renders it in QUIRKS mode where vh/vw are
not understood at all. A vh size here was silently dropped and the icon always came out at its
natural 32x32, whatever number was written. 120px is the size the original 34vh was ASKING for
(34% of the ~354px-tall splash) and never getting. */
img { position:absolute; top:0; left:0; width:120px; height:120px; margin:0; }
/* The nebula's centre is bright, so the caption gets a dark halo to stay readable over it. */
#msg { font-size:4.2vh; text-shadow:0 0 0.6vh #000, 0 0 1.2vh #000; }
#bar { width:60vw; height:1.4vh; background:#333; margin-top:3.5vh; overflow:hidden; position:relative; }
#chunk { width:18vw; height:1.4vh; background:#5b9bd5; position:absolute; left:-18vw;
animation:slide 1.1s linear infinite; }
@keyframes slide { from { left:-18vw; } to { left:78vw; } }
</style>
<script language="JScript">
// iview_app.jl (the real window-owning Julia process) drops this flag once its window is up.
// We poll for it instead of any fixed delay because Julia/GMT startup time is variable (cold
// vs warm precompile cache).
var fso = new ActiveXObject("Scripting.FileSystemObject");
var flag = fso.GetSpecialFolder(2).Path + "\\igmt_ready.flag";
var elapsed = 0;
var TIMEOUT_MS = 120000; // safety net: never sit on screen forever if iview_app.jl errors out
var POLL_MS = 150;
function poll() {
elapsed += POLL_MS;
if (fso.FileExists(flag) || elapsed >= TIMEOUT_MS) {
window.close();
return;
}
setTimeout("poll()", POLL_MS);
}
window.onload = function () {
document.body.style.visibility = "visible";
setTimeout("poll()", POLL_MS);
};
</script>
</head>
<body style="visibility:hidden;">
<div id="wrap">
<img src="igmt.ico" alt="iGMT" />
<div id="msg">Starting iGMT…</div>
<div id="bar"><div id="chunk"></div></div>
</div>
</body>
</html>