|
24 | 24 | <meta id="vscode-remote-nls-configuration" data-settings="{{NLS_CONFIGURATION}}" /> |
25 | 25 |
|
26 | 26 | <!-- Workbench Icon/Manifest/CSS --> |
27 | | - <link rel="icon" href="{{BASE}}/static/{{COMMIT}}/src/browser/media/favicon.ico" type="image/x-icon" /> |
28 | | - <link |
29 | | - rel="manifest" |
30 | | - href="{{BASE}}/static/{{COMMIT}}/src/browser/media/manifest.json" |
31 | | - crossorigin="use-credentials" |
32 | | - /> |
| 27 | + <link rel="icon" href="{{CS_STATIC_BASE}}/src/browser/media/favicon.ico" type="image/x-icon" /> |
| 28 | + <link rel="manifest" href="{{CS_STATIC_BASE}}/src/browser/media/manifest.json" crossorigin="use-credentials" /> |
33 | 29 | <!-- PROD_ONLY |
34 | | - <link data-name="vs/workbench/workbench.web.api" rel="stylesheet" href="{{BASE}}/static/{{COMMIT}}/lib/vscode/out/vs/workbench/workbench.web.api.css"> |
| 30 | + <link data-name="vs/workbench/workbench.web.api" rel="stylesheet" href="{{CS_STATIC_BASE}}/lib/vscode/out/vs/workbench/workbench.web.api.css"> |
35 | 31 | END_PROD_ONLY --> |
36 | | - <link rel="apple-touch-icon" href="{{BASE}}/static/{{COMMIT}}/src/browser/media/pwa-icon-384.png" /> |
| 32 | + <link rel="apple-touch-icon" href="{{CS_STATIC_BASE}}/src/browser/media/pwa-icon-384.png" /> |
37 | 33 | <meta name="apple-mobile-web-app-capable" content="yes" /> |
38 | 34 |
|
39 | 35 | <!-- Prefetch to avoid waterfall --> |
40 | 36 | <!-- PROD_ONLY |
41 | | - <link rel="prefetch" href="{{BASE}}/static/{{COMMIT}}/lib/vscode/node_modules/semver-umd/lib/semver-umd.js"> |
| 37 | + <link rel="prefetch" href="{{CS_STATIC_BASE}}/lib/vscode/node_modules/semver-umd/lib/semver-umd.js"> |
42 | 38 | END_PROD_ONLY --> |
43 | 39 |
|
44 | 40 | <meta id="coder-options" data-settings="{{OPTIONS}}" /> |
|
48 | 44 |
|
49 | 45 | <!-- Startup (do not modify order of script tags!) --> |
50 | 46 | <script> |
51 | | - const parts = window.location.pathname.replace(/^\//g, "").split("/") |
52 | | - parts[parts.length - 1] = "{{BASE}}" |
53 | | - const url = new URL(window.location.origin + "/" + parts.join("/")) |
54 | | - const staticBase = url.href.replace(/\/+$/, "") + "/static/{{COMMIT}}/lib/vscode" |
55 | 47 | let nlsConfig |
56 | 48 | try { |
57 | 49 | nlsConfig = JSON.parse(document.getElementById("vscode-remote-nls-configuration").getAttribute("data-settings")) |
|
64 | 56 | } |
65 | 57 | // FIXME: Only works if path separators are /. |
66 | 58 | const path = nlsConfig._resolvedLanguagePackCoreLocation + "/" + bundle.replace(/\//g, "!") + ".nls.json" |
67 | | - fetch(`${url.href}/resource/?path=${encodeURIComponent(path)}`) |
| 59 | + fetch(`{{BASE}}/resource/?path=${encodeURIComponent(path)}`) |
68 | 60 | .then((response) => response.json()) |
69 | 61 | .then((json) => { |
70 | 62 | bundles[bundle] = json |
|
77 | 69 | /* Probably fine. */ |
78 | 70 | } |
79 | 71 | self.require = { |
80 | | - baseUrl: `${staticBase}/out`, |
| 72 | + baseUrl: "{{CS_STATIC_BASE}}/lib/vscode/out", |
81 | 73 | paths: { |
82 | | - "vscode-textmate": `${staticBase}/node_modules/vscode-textmate/release/main`, |
83 | | - "vscode-oniguruma": `${staticBase}/node_modules/vscode-oniguruma/release/main`, |
84 | | - xterm: `${staticBase}/node_modules/xterm/lib/xterm.js`, |
85 | | - "xterm-addon-search": `${staticBase}/node_modules/xterm-addon-search/lib/xterm-addon-search.js`, |
86 | | - "xterm-addon-unicode11": `${staticBase}/node_modules/xterm-addon-unicode11/lib/xterm-addon-unicode11.js`, |
87 | | - "xterm-addon-webgl": `${staticBase}/node_modules/xterm-addon-webgl/lib/xterm-addon-webgl.js`, |
88 | | - "semver-umd": `${staticBase}/node_modules/semver-umd/lib/semver-umd.js`, |
89 | | - "iconv-lite-umd": `${staticBase}/node_modules/iconv-lite-umd/lib/iconv-lite-umd.js`, |
90 | | - jschardet: `${staticBase}/node_modules/jschardet/dist/jschardet.min.js`, |
| 74 | + "vscode-textmate": `../node_modules/vscode-textmate/release/main`, |
| 75 | + "vscode-oniguruma": `../node_modules/vscode-oniguruma/release/main`, |
| 76 | + xterm: `../node_modules/xterm/lib/xterm.js`, |
| 77 | + "xterm-addon-search": `../node_modules/xterm-addon-search/lib/xterm-addon-search.js`, |
| 78 | + "xterm-addon-unicode11": `../node_modules/xterm-addon-unicode11/lib/xterm-addon-unicode11.js`, |
| 79 | + "xterm-addon-webgl": `../node_modules/xterm-addon-webgl/lib/xterm-addon-webgl.js`, |
| 80 | + "semver-umd": `../node_modules/semver-umd/lib/semver-umd.js`, |
| 81 | + "iconv-lite-umd": `../node_modules/iconv-lite-umd/lib/iconv-lite-umd.js`, |
| 82 | + jschardet: `../node_modules/jschardet/dist/jschardet.min.js`, |
91 | 83 | }, |
92 | 84 | "vs/nls": nlsConfig, |
93 | 85 | } |
94 | 86 | </script> |
95 | | - <script data-cfasync="false" src="{{BASE}}/static/{{COMMIT}}/dist/register.js"></script> |
96 | | - <script data-cfasync="false" src="{{BASE}}/static/{{COMMIT}}/lib/vscode/out/vs/loader.js"></script> |
| 87 | + <script data-cfasync="false" src="{{CS_STATIC_BASE}}/dist/register.js"></script> |
| 88 | + <script data-cfasync="false" src="{{CS_STATIC_BASE}}/lib/vscode/out/vs/loader.js"></script> |
97 | 89 | <!-- PROD_ONLY |
98 | | - <script data-cfasync="false" src="{{BASE}}/static/{{COMMIT}}/lib/vscode/out/vs/workbench/workbench.web.api.nls.js"></script> |
99 | | - <script data-cfasync="false" src="{{BASE}}/static/{{COMMIT}}/lib/vscode/out/vs/workbench/workbench.web.api.js"></script> |
| 90 | + <script data-cfasync="false" src="{{CS_STATIC_BASE}}/lib/vscode/out/vs/workbench/workbench.web.api.nls.js"></script> |
| 91 | + <script data-cfasync="false" src="{{CS_STATIC_BASE}}/lib/vscode/out/vs/workbench/workbench.web.api.js"></script> |
100 | 92 | END_PROD_ONLY --> |
101 | 93 | <script> |
102 | 94 | require(["vs/code/browser/workbench/workbench"], function () {}) |
|
0 commit comments