-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
31 lines (29 loc) · 1.02 KB
/
index.html
File metadata and controls
31 lines (29 loc) · 1.02 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>browsercomp</title>
<script src="https://cjrtnc.leaningtech.com/4.0/loader.js"></script>
<link rel="icon" href="browsercomp.png" type="image/png">
</head>
<body style="background: #212529">
<script>
(async function () {
function execCb(cmdPath, argsArray) {
if (cmdPath === "xdg-open") {
window.open(argsArray, "_blank");
}
}
const javaVersion = 8; // allowed 8 or 11
await cheerpjInit({version: javaVersion, execCallback: execCb, clipboardMode: "system"}, document.body);
const bcompMinWidth = 860;
const bcompMinHeight = 600
cheerpjCreateDisplay(Math.max(bcompMinWidth, window.innerWidth - 16), Math.max(bcompMinHeight, window.innerHeight - 16));
// "/app/" is specific for CheerpJ
const githubPagesRoot = "/app/browsercomp"
const bcompJar = "bcomp-ng_v1.45.09.jar" // https://github.com/tune-it/bcomp
await cheerpjRunJar(`${githubPagesRoot}/${bcompJar}`)
})();
</script>
</body>
</html>