Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
11ffcfcf
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
11ffcfcf
编写于
8月 16, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove unused
上级
f014cbcf
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
0 addition
and
233 deletion
+0
-233
src/vs/workbench/electron-browser/index.html
src/vs/workbench/electron-browser/index.html
+0
-233
未找到文件。
src/vs/workbench/electron-browser/index.html
已删除
100644 → 0
浏览文件 @
f014cbcf
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
/>
<!-- Theming (do not remove, we want to early load it to avoid flashing background) -->
<style>
.monaco-shell.vs-dark
{
background-color
:
#1E1E1E
;
}
</style>
<!-- Helpers -->
<script
type=
"text/javascript"
>
var
fs
=
require
(
'
fs
'
);
var
path
=
require
(
'
path
'
);
var
electron
=
require
(
'
electron
'
);
var
remote
=
electron
.
remote
;
var
ipc
=
electron
.
ipcRenderer
;
var
windowId
=
remote
.
getCurrentWindow
().
id
;
function
onError
(
error
,
enableDeveloperTools
)
{
if
(
enableDeveloperTools
)
{
ipc
.
send
(
'
vscode:openDevTools
'
,
windowId
);
}
console
.
error
(
'
[uncaught exception]:
'
+
error
);
if
(
error
.
stack
)
{
console
.
error
(
error
.
stack
);
}
}
function
parseURLQueryArgs
()
{
var
result
=
{};
var
search
=
window
.
location
.
search
;
if
(
search
)
{
var
params
=
search
.
split
(
/
[
?&
]
/
);
for
(
var
i
=
0
;
i
<
params
.
length
;
i
++
)
{
var
param
=
params
[
i
];
if
(
param
)
{
var
keyValue
=
param
.
split
(
'
=
'
);
if
(
keyValue
.
length
===
2
)
{
result
[
keyValue
[
0
]]
=
decodeURIComponent
(
keyValue
[
1
]);
}
}
}
}
return
result
;
}
function
createScript
(
src
,
onload
)
{
var
script
=
document
.
createElement
(
'
script
'
);
script
.
src
=
src
;
script
.
addEventListener
(
'
load
'
,
onload
);
var
head
=
document
.
getElementsByTagName
(
'
head
'
)[
0
];
head
.
insertBefore
(
script
,
head
.
lastChild
);
}
function
uriFromPath
(
_path
)
{
var
pathName
=
path
.
resolve
(
_path
).
replace
(
/
\\
/g
,
'
/
'
);
if
(
pathName
.
length
>
0
&&
pathName
.
charAt
(
0
)
!==
'
/
'
)
{
pathName
=
'
/
'
+
pathName
;
}
return
encodeURI
(
'
file://
'
+
pathName
);
}
function
registerListeners
(
enableDeveloperTools
)
{
// Devtools & reload support
if
(
enableDeveloperTools
)
{
var
extractKey
=
function
(
e
)
{
return
[
e
.
ctrlKey
?
'
ctrl-
'
:
''
,
e
.
metaKey
?
'
meta-
'
:
''
,
e
.
altKey
?
'
alt-
'
:
''
,
e
.
shiftKey
?
'
shift-
'
:
''
,
e
.
keyCode
].
join
(
''
);
};
var
TOGGLE_DEV_TOOLS_KB
=
(
process
.
platform
===
'
darwin
'
?
'
meta-alt-73
'
:
'
ctrl-shift-73
'
);
// mac: Cmd-Alt-I, rest: Ctrl-Shift-I
var
RELOAD_KB
=
(
process
.
platform
===
'
darwin
'
?
'
meta-82
'
:
'
ctrl-82
'
);
// mac: Cmd-R, rest: Ctrl-R
window
.
addEventListener
(
'
keydown
'
,
function
(
e
)
{
var
key
=
extractKey
(
e
);
if
(
key
===
TOGGLE_DEV_TOOLS_KB
)
{
ipc
.
send
(
'
vscode:toggleDevTools
'
,
windowId
);
}
else
if
(
key
===
RELOAD_KB
)
{
ipc
.
send
(
'
vscode:reloadWindow
'
,
windowId
);
}
});
}
process
.
on
(
'
uncaughtException
'
,
function
(
error
)
{
onError
(
error
,
enableDeveloperTools
)
});
}
function
assign
(
destination
,
source
)
{
source
=>
Object
.
keys
(
source
).
forEach
(
key
=>
destination
[
key
]
=
source
[
key
]);
return
destination
;
}
</script>
<!-- Startup Code -->
<script
type=
"text/javascript"
>
var
webFrame
=
require
(
'
electron
'
).
webFrame
;
var
args
=
parseURLQueryArgs
();
var
configuration
=
JSON
.
parse
(
args
[
'
config
'
])
||
{};
var
enableDeveloperTools
=
!
configuration
.
isBuilt
||
!!
configuration
.
extensionDevelopmentPath
;
// Correctly inherit the parent's environment
assign
(
process
.
env
,
configuration
.
userEnv
);
// Get the nls configuration into the process.env as early as possible.
var
nlsConfig
=
{
availableLanguages
:
{}
};
var
config
=
process
.
env
[
'
VSCODE_NLS_CONFIG
'
];
if
(
config
)
{
process
.
env
[
'
VSCODE_NLS_CONFIG
'
]
=
config
;
try
{
nlsConfig
=
JSON
.
parse
(
config
);
}
catch
(
e
)
{}
}
var
locale
=
nlsConfig
.
availableLanguages
[
'
*
'
]
||
'
en
'
;
if
(
locale
===
'
zh-tw
'
)
{
locale
=
'
zh-Hant
'
;
}
else
if
(
locale
===
'
zh-cn
'
)
{
locale
=
'
zh-Hans
'
;
}
window
.
document
.
documentElement
.
setAttribute
(
'
lang
'
,
locale
);
registerListeners
(
enableDeveloperTools
);
// We get the global settings through a remote call from the browser
// because its value can change dynamically.
var
globalSettings
;
var
globalSettingsValue
=
remote
.
getGlobal
(
'
globalSettingsValue
'
);
if
(
globalSettingsValue
)
{
globalSettings
=
JSON
.
parse
(
globalSettingsValue
);
}
else
{
globalSettings
=
{
settings
:
{},
keybindings
:
[]
};
}
// disable pinch zoom & apply zoom level early to avoid glitches
var
windowConfiguration
=
globalSettings
.
settings
&&
globalSettings
.
settings
.
window
;
webFrame
.
setZoomLevelLimits
(
1
,
1
);
if
(
windowConfiguration
&&
typeof
windowConfiguration
.
zoomLevel
===
'
number
'
&&
windowConfiguration
.
zoomLevel
!==
0
)
{
webFrame
.
setZoomLevel
(
windowConfiguration
.
zoomLevel
);
}
// Load the loader and start loading the workbench
var
rootUrl
=
uriFromPath
(
configuration
.
appRoot
)
+
'
/out
'
;
// In the bundled version the nls plugin is packaged with the loader so the NLS Plugins
// loads as soon as the loader loads. To be able to have pseudo translation
createScript
(
rootUrl
+
'
/vs/loader.js
'
,
function
()
{
define
(
'
fs
'
,
[
'
original-fs
'
],
function
(
originalFS
)
{
return
originalFS
;
});
// replace the patched electron fs with the original node fs for all AMD code
require
.
config
({
baseUrl
:
rootUrl
,
'
vs/nls
'
:
nlsConfig
,
recordStats
:
configuration
.
enablePerformance
,
ignoreDuplicateModules
:
[
'
vs/workbench/parts/search/common/searchQuery
'
]
});
if
(
nlsConfig
.
pseudo
)
{
require
([
'
vs/nls
'
],
function
(
nlsPlugin
)
{
nlsPlugin
.
setPseudoTranslation
(
nlsConfig
.
pseudo
);
});
}
window
.
MonacoEnvironment
=
{};
var
timers
=
window
.
MonacoEnvironment
.
timers
=
{
start
:
new
Date
()
};
if
(
configuration
.
enablePerformance
)
{
var
programStart
=
remote
.
getGlobal
(
'
programStart
'
);
var
vscodeStart
=
remote
.
getGlobal
(
'
vscodeStart
'
);
if
(
programStart
)
{
timers
.
beforeProgram
=
new
Date
(
programStart
);
timers
.
afterProgram
=
new
Date
(
vscodeStart
);
}
timers
.
vscodeStart
=
new
Date
(
vscodeStart
);
timers
.
start
=
new
Date
(
programStart
||
vscodeStart
);
}
timers
.
beforeLoad
=
new
Date
();
require
([
'
vs/workbench/workbench.main
'
,
'
vs/nls!vs/workbench/workbench.main
'
,
'
vs/css!vs/workbench/workbench.main
'
],
()
=>
{
timers
.
afterLoad
=
new
Date
();
const
main
=
require
(
'
vs/workbench/electron-browser/main
'
)
.
startup
(
configuration
,
globalSettings
)
.
done
(
null
,
error
=>
onError
(
error
,
enableDeveloperTools
));
});
});
</script>
</head>
<body
class=
"monaco-shell vs-dark"
aria-label=
""
>
<script>
(
function
()
{
try
{
var
theme
=
window
.
localStorage
.
getItem
(
'
storage://global/workbench.theme
'
);
if
(
theme
)
{
var
baseTheme
=
theme
.
split
(
'
'
)[
0
];
if
(
baseTheme
!==
'
vs-dark
'
)
{
window
.
document
.
body
.
className
=
'
monaco-shell
'
+
baseTheme
;
}
}
}
catch
(
error
)
{
console
.
error
(
error
);
}
})();
</script>
</body>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录