forked from MercuryWorkshop/vscode-anura
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
101 lines (93 loc) · 3.6 KB
/
index.html
File metadata and controls
101 lines (93 loc) · 3.6 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
90
91
92
93
94
95
96
97
98
99
100
101
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<!-- Mobile tweaks -->
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="Code" />
<link rel="apple-touch-icon" href="./code-192.png" />
<!-- Disable pinch zooming -->
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<!-- Workbench Icon/Manifest/CSS -->
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<link rel="manifest" href="/manifest.json" />
<link data-name="vs/workbench/workbench.web.main" rel="stylesheet"
href="./node_modules/vscode-web/dist/out/vs/workbench/workbench.web.main.css" />
</head>
<body aria-label=""></body>
<script type="module">
(async () => {
const productData = `{
"productConfiguration": {
"nameShort": "VSCode",
"nameLong": "Visual Studio Code",
"applicationName": "code-web-sample",
"dataFolderName": ".vscode-web-sample",
"version": "1.91.1",
"extensionsGallery": {
"serviceUrl": "https://open-vsx.org/vscode/gallery",
"itemUrl": "https://open-vsx.org/vscode/item",
"resourceUrlTemplate": "https://openvsxorg.blob.core.windows.net/resources/{publisher}/{name}/{version}/{path}"
},
"extensionEnabledApiProposals": {
"vscode.vscode-web-playground": [
"fileSearchProvider",
"textSearchProvider"
]
}
},
"additionalBuiltinExtensions": [
{
"scheme": "${location.protocol.slice(0, -1)}",
"path": "${location.pathname.split("/").slice(0, -1).join("/")}/myExt"
},
{
"scheme": "${location.protocol.slice(0, -1)}",
"path": "${location.pathname.split("/").slice(0, -1).join("/")}/myDav"
}
]
}
`
try {
const lib = await xen.parent.packages.import('xen.runtime');
const runtime = await lib.createRuntime(location.href);
try {
const fileData = JSON.stringify(await parent.xen.fs.read(runtime.url + "/product.json"/*, productData*/));
if (fileData !== productData) {
throw new Error("Product data outdated")
}
} catch {
await parent.xen.fs.write(runtime.url + "/product.json", productData)
location.reload();
}
} catch (err) {
console.error(err);
}
})();
</script>
<script src="./node_modules/vscode-web/dist/out/vs/loader.js"></script>
<script src="./node_modules/vscode-web/dist/out/vs/webPackagePaths.js"></script>
<script>
Object.keys(self.webPackagePaths).map(function (key, index) {
self.webPackagePaths[
key
] = `${location.href.split("/").slice(0, location.href.split("/").length - 1).join("/")}/node_modules/vscode-web/dist/node_modules/${key}/${self.webPackagePaths[key]}`;
});
require.config({
baseUrl: `${location.href.split("/").slice(0, location.href.split("/").length - 1).join("/")}/node_modules/vscode-web/dist/out`,
recordStats: true,
trustedTypesPolicy: window.trustedTypes?.createPolicy('amdLoader', {
createScriptURL(value) {
return value;
},
}),
paths: self.webPackagePaths,
});
</script>
<script src="./node_modules/vscode-web/dist/out/vs/workbench/workbench.web.main.nls.js"></script>
<script src="./node_modules/vscode-web/dist/out/vs/workbench/workbench.web.main.js"></script>
<script src="./node_modules/vscode-web/dist/out/vs/code/browser/workbench/workbench.js"></script>
</html>