diff --git a/src/apps/viewer/index.ts b/src/apps/viewer/index.ts index e7d5ef2739a4d50216a2c0e6b313d1c347e6d25c..9b8943b41114fc5401d18dac930cfe55123000a9 100644 --- a/src/apps/viewer/index.ts +++ b/src/apps/viewer/index.ts @@ -23,9 +23,11 @@ import { ObjectKeys } from '../../mol-util/type-helpers'; import { PluginState } from '../../mol-plugin/state'; import { DownloadDensity } from '../../mol-plugin-state/actions/volume'; import { PluginLayoutControlsDisplay } from '../../mol-plugin/layout'; + require('mol-plugin-ui/skin/light.scss'); export { PLUGIN_VERSION as version } from '../../mol-plugin/version'; +export { setProductionMode, setDebugMode } from '../../mol-util/debug'; const Extensions = { 'cellpack': PluginSpec.Behavior(CellPack), diff --git a/src/mol-util/debug.ts b/src/mol-util/debug.ts index e9c40765fa142d55054c463f82d2de4c78b2b639..b96d6fb06bb358d0f45b312a040129b1663420a1 100644 --- a/src/mol-util/debug.ts +++ b/src/mol-util/debug.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info. + * Copyright (c) 2019-2020 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> */ @@ -16,13 +16,12 @@ let isProductionMode = process.env.NODE_ENV === 'production'; */ let isDebugMode = process.env.DEBUG === '*' || process.env.DEBUG === 'molstar'; -if (typeof window !== 'undefined' && !(window as any).setMolStarDebugMode) { - try { - (window as any).setMolStarDebugMode = function setMolStarDebugMode(isDebug?: boolean, isProduction?: boolean) { - if (typeof isDebug !== 'undefined') isDebugMode = isDebug; - if (typeof isProduction !== 'undefined') isProductionMode = isProduction; - }; - } catch { } +export { isProductionMode, isDebugMode }; + +export function setProductionMode(value?: boolean) { + if (typeof value !== 'undefined') isProductionMode = value; } -export { isProductionMode, isDebugMode }; \ No newline at end of file +export function setDebugMode(value?: boolean) { + if (typeof value !== 'undefined') isDebugMode = value; +} \ No newline at end of file