mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
@@ -59,7 +59,7 @@
|
||||
];
|
||||
|
||||
const settings = getSettings();
|
||||
const isMac = settings.isMac;
|
||||
const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
||||
|
||||
const vscode = acquireVsCodeApi();
|
||||
|
||||
|
||||
@@ -206,7 +206,6 @@ class Preview extends Disposable {
|
||||
private async getWebviewContents(): Promise<string> {
|
||||
const version = Date.now().toString();
|
||||
const settings = {
|
||||
isMac: isMac(),
|
||||
src: await this.getResourcePath(this.webviewEditor, this.resource, version),
|
||||
};
|
||||
|
||||
@@ -262,15 +261,6 @@ class Preview extends Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
declare const process: undefined | { readonly platform: string };
|
||||
|
||||
function isMac(): boolean {
|
||||
if (typeof process === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
return process.platform === 'darwin';
|
||||
}
|
||||
|
||||
function escapeAttribute(value: string | vscode.Uri): string {
|
||||
return value.toString().replace(/"/g, '"');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user