Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extensions/image-preview/media/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
];

const settings = getSettings();
const isMac = settings.isMac;
const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;

const vscode = acquireVsCodeApi();

Expand Down
10 changes: 0 additions & 10 deletions extensions/image-preview/src/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
};

Expand Down Expand Up @@ -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, '&quot;');
}
Expand Down