提交 c43fe759 编写于 作者: M Matt Bierner

Move strings to own file

上级 32e0e2d6
......@@ -4,11 +4,9 @@
*--------------------------------------------------------------------------------------------*/
import { getSettings } from './settings';
import { getStrings } from './strings';
import { postCommand } from './messaging';
const strings = JSON.parse(document.getElementById('vscode-markdown-preview-data').getAttribute('data-strings'));
const settings = getSettings();
/**
* Shows an alert when there is a content security policy violation.
*/
......@@ -28,6 +26,9 @@ export class CspAlerter {
}
private showCspWarning() {
const strings = getStrings();
const settings = getSettings();
if (this.didShow || settings.disableSecurityWarnings) {
return;
}
......
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export function getStrings(): { [key: string]: string } {
return JSON.parse(document.getElementById('vscode-markdown-preview-data').getAttribute('data-strings'));
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册