Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ServerConnection.makeSettings = function(options?: Partial) {
options = {
...options,
...{
baseUrl: PageConfig.getBaseUrl(),
pageUrl: PageConfig.getOption('pageUrl'),
wsUrl: PageConfig.getWsUrl(),
token: PageConfig.getToken()
}
};
return oldMakeSettings(options);
};
super(options);
this._electronInfo = { ...JupyterLab.defaultInfo, ...options };
if (this._electronInfo.devMode) {
this.shell.addClass('jp-mod-devMode');
}
// Get the top panel widget
let topPanel: Widget;
each(this.shell.layout.iter(), (widget: Widget) => {
if (widget.id === 'jp-top-panel') {
topPanel = widget;
return false;
}
});
topPanel.addClass('jpe-mod-' + options.uiState);
if (options.uiState === 'mac') {
// Resize the top panel based on zoom factor