Revert "Merge from vscode ada4bddb8edc69eea6ebaaa0e88c5f903cbd43d8 (#5529)" (#5553)

This reverts commit 5d44b6a6a7.
This commit is contained in:
Anthony Dresser
2019-05-20 17:07:32 -07:00
committed by GitHub
parent 1315b8e42a
commit c9a4f8f664
325 changed files with 3332 additions and 4501 deletions

View File

@@ -106,8 +106,8 @@ function showPartsSplash(configuration) {
const style = document.createElement('style');
style.className = 'initialShellColors';
document.head.appendChild(style);
document.body.className = baseTheme;
style.innerHTML = `body { background-color: ${shellBackground}; color: ${shellForeground}; }`;
document.body.className = `monaco-shell ${baseTheme}`;
style.innerHTML = `.monaco-shell { background-color: ${shellBackground}; color: ${shellForeground}; }`;
if (data && data.layoutInfo) {
// restore parts if possible (we might not always store layout info)

View File

@@ -0,0 +1,12 @@
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body class="monaco-shell vs-dark" aria-label="">
</body>
<!-- Startup via workbench.nodeless.js -->
<script src="workbench.nodeless.js"></script>
</html>

View File

@@ -0,0 +1,67 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
'use strict';
(function () {
function uriFromPath(_path) {
let pathName = _path.replace(/\\/g, '/');
if (pathName.length > 0 && pathName.charAt(0) !== '/') {
pathName = '/' + pathName;
}
let uri;
if (navigator.userAgent.indexOf('Windows') >= 0 && pathName.startsWith('//')) { // specially handle Windows UNC paths
uri = encodeURI('file:' + pathName);
} else {
uri = encodeURI('file://' + pathName);
}
return uri.replace(/#/g, '%23');
}
function parseURLQueryArgs() {
const search = window.location.search || '';
return search.split(/[?&]/)
.filter(function (param) { return !!param; })
.map(function (param) { return param.split('='); })
.filter(function (param) { return param.length === 2; })
.reduce(function (r, param) { r[param[0]] = decodeURIComponent(param[1]); return r; }, {});
}
function loadScript(path, callback) {
let script = document.createElement('script');
script.onload = callback;
script.async = true;
script.type = 'text/javascript';
script.src = path;
document.head.appendChild(script);
}
loadScript('../../../../../out/vs/loader.js', function () {
const args = parseURLQueryArgs();
const configuration = JSON.parse(args['config'] || '{}') || {};
// @ts-ignore
require.config({
baseUrl: uriFromPath(configuration.appRoot) + '/out',
});
// @ts-ignore
require([
'vs/workbench/workbench.nodeless.main',
'vs/nls!vs/workbench/workbench.nodeless.main',
'vs/css!vs/workbench/workbench.nodeless.main'
], function () {
// @ts-ignore
require('vs/workbench/browser/nodeless.main').main().then(undefined, console.error);
});
});
})();