From 7e1a77429de4f98b15a20b5486601e6299eeb4ae Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 4 Oct 2016 12:12:39 +0200 Subject: [PATCH] let => const --- .../browser/parts/editor/baseEditor.ts | 50 +++++++++---------- .../browser/parts/editor/binaryDiffEditor.ts | 22 ++++---- .../browser/parts/editor/binaryEditor.ts | 8 +-- .../parts/editor/editor.contribution.ts | 6 +-- .../browser/parts/editor/editorPicker.ts | 4 +- .../browser/parts/editor/stringEditor.ts | 30 +++++------ .../browser/parts/editor/textDiffEditor.ts | 44 ++++++++-------- 7 files changed, 82 insertions(+), 82 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/baseEditor.ts b/src/vs/workbench/browser/parts/editor/baseEditor.ts index 4dbbf9578dc..9918792ef8b 100644 --- a/src/vs/workbench/browser/parts/editor/baseEditor.ts +++ b/src/vs/workbench/browser/parts/editor/baseEditor.ts @@ -86,7 +86,7 @@ export abstract class BaseEditor extends Panel implements IEditor { public create(parent: Builder): void; // create is sync for editors public create(parent: Builder): TPromise; public create(parent: Builder): TPromise { - let res = super.create(parent); + const res = super.create(parent); // Create Editor this.createEditor(parent); @@ -105,7 +105,7 @@ export abstract class BaseEditor extends Panel implements IEditor { public setVisible(visible: boolean, position?: Position): void; // setVisible is sync for editors public setVisible(visible: boolean, position?: Position): TPromise; public setVisible(visible: boolean, position: Position = null): TPromise { - let promise = super.setVisible(visible); + const promise = super.setVisible(visible); // Propagate to Editor this.setEditorVisible(visible, position); @@ -185,7 +185,7 @@ class EditorRegistry implements IEditorRegistry { this.instantiationService = service; for (let key in this.editorInputFactoryConstructors) { - let element = this.editorInputFactoryConstructors[key]; + const element = this.editorInputFactoryConstructors[key]; this.createEditorInputFactory(key, element); } @@ -193,7 +193,7 @@ class EditorRegistry implements IEditorRegistry { } private createEditorInputFactory(editorInputId: string, ctor: IConstructorSignature0): void { - let instance = this.instantiationService.createInstance(ctor); + const instance = this.instantiationService.createInstance(ctor); this.editorInputFactoryInstances[editorInputId] = instance; } @@ -215,14 +215,14 @@ class EditorRegistry implements IEditorRegistry { } public getEditor(input: EditorInput): EditorDescriptor { - let findEditorDescriptors = (input: EditorInput, byInstanceOf?: boolean): EditorDescriptor[]=> { - let matchingDescriptors: EditorDescriptor[] = []; + const findEditorDescriptors = (input: EditorInput, byInstanceOf?: boolean): EditorDescriptor[]=> { + const matchingDescriptors: EditorDescriptor[] = []; for (let i = 0; i < this.editors.length; i++) { - let editor = this.editors[i]; - let inputDescriptors = []>editor[INPUT_DESCRIPTORS_PROPERTY]; + const editor = this.editors[i]; + const inputDescriptors = []>editor[INPUT_DESCRIPTORS_PROPERTY]; for (let j = 0; j < inputDescriptors.length; j++) { - let inputClass = inputDescriptors[j].ctor; + const inputClass = inputDescriptors[j].ctor; // Direct check on constructor type (ignores prototype chain) if (!byInstanceOf && (input).constructor === inputClass) { @@ -250,11 +250,11 @@ class EditorRegistry implements IEditorRegistry { return matchingDescriptors; }; - let descriptors = findEditorDescriptors(input); + const descriptors = findEditorDescriptors(input); if (descriptors && descriptors.length > 0) { // Ask the input for its preferred Editor - let preferredEditorId = input.getPreferredEditorId(descriptors.map(d => d.getId())); + const preferredEditorId = input.getPreferredEditorId(descriptors.map(d => d.getId())); if (preferredEditorId) { return this.getEditorById(preferredEditorId); } @@ -268,7 +268,7 @@ class EditorRegistry implements IEditorRegistry { public getEditorById(editorId: string): EditorDescriptor { for (let i = 0; i < this.editors.length; i++) { - let editor = this.editors[i]; + const editor = this.editors[i]; if (editor.getId() === editorId) { return editor; } @@ -286,10 +286,10 @@ class EditorRegistry implements IEditorRegistry { } public getEditorInputs(): any[] { - let inputClasses: any[] = []; + const inputClasses: any[] = []; for (let i = 0; i < this.editors.length; i++) { - let editor = this.editors[i]; - let editorInputDescriptors = []>editor[INPUT_DESCRIPTORS_PROPERTY]; + const editor = this.editors[i]; + const editorInputDescriptors = []>editor[INPUT_DESCRIPTORS_PROPERTY]; inputClasses.push(...editorInputDescriptors.map(descriptor=> descriptor.ctor)); } @@ -346,7 +346,7 @@ export class EditorInputActionContributor extends ActionBarContributor { } private createPositionArray(): any[] { - let array: any[] = []; + const array: any[] = []; for (let i = 0; i < POSITIONS.length; i++) { array[i] = {}; @@ -371,7 +371,7 @@ export class EditorInputActionContributor extends ActionBarContributor { private doClearInputsFromCache(cache: { [id: string]: IEditorInputAction[] }): void { for (let key in cache) { if (cache.hasOwnProperty(key)) { - let cachedActions = cache[key]; + const cachedActions = cache[key]; cachedActions.forEach((action) => { action.input = null; action.position = null; @@ -412,9 +412,9 @@ export class EditorInputActionContributor extends ActionBarContributor { this.clearInputsFromCache(context.position, true /* primary actions */); // First consult cache - let editorInput = context.input; - let editorPosition = context.position; - let cachedActions = this.mapEditorInputActionContextToPrimaryActions[context.position][this.toId(context)]; + const editorInput = context.input; + const editorPosition = context.position; + const cachedActions = this.mapEditorInputActionContextToPrimaryActions[context.position][this.toId(context)]; if (cachedActions) { // Update the input field and position in all actions to indicate this change and return @@ -427,7 +427,7 @@ export class EditorInputActionContributor extends ActionBarContributor { } // Otherwise collect and keep in cache - let actions = this.getActionsForEditorInput(context); + const actions = this.getActionsForEditorInput(context); actions.forEach((action) => { action.input = editorInput; action.position = editorPosition; @@ -470,9 +470,9 @@ export class EditorInputActionContributor extends ActionBarContributor { this.clearInputsFromCache(context.position, false /* secondary actions */); // First consult cache - let editorInput = context.input; - let editorPosition = context.position; - let cachedActions = this.mapEditorInputActionContextToSecondaryActions[context.position][this.toId(context)]; + const editorInput = context.input; + const editorPosition = context.position; + const cachedActions = this.mapEditorInputActionContextToSecondaryActions[context.position][this.toId(context)]; if (cachedActions) { // Update the input field and position in all actions to indicate this change and return @@ -485,7 +485,7 @@ export class EditorInputActionContributor extends ActionBarContributor { } // Otherwise collect and keep in cache - let actions = this.getSecondaryActionsForEditorInput(context); + const actions = this.getSecondaryActionsForEditorInput(context); actions.forEach((action) => { action.input = editorInput; action.position = editorPosition; diff --git a/src/vs/workbench/browser/parts/editor/binaryDiffEditor.ts b/src/vs/workbench/browser/parts/editor/binaryDiffEditor.ts index 79fb82d8288..e406a24e3b3 100644 --- a/src/vs/workbench/browser/parts/editor/binaryDiffEditor.ts +++ b/src/vs/workbench/browser/parts/editor/binaryDiffEditor.ts @@ -64,7 +64,7 @@ export class BinaryResourceDiffEditor extends BaseEditor implements IVerticalSas public createEditor(parent: Builder): void { // Left Container for Binary - let leftBinaryContainerElement = document.createElement('div'); + const leftBinaryContainerElement = document.createElement('div'); leftBinaryContainerElement.className = 'binary-container'; this.leftBinaryContainer = $(leftBinaryContainerElement); this.leftBinaryContainer.tabindex(0); // enable focus support from the editor part (do not remove) @@ -82,7 +82,7 @@ export class BinaryResourceDiffEditor extends BaseEditor implements IVerticalSas this.sash.addListener2('reset', () => this.onSashReset()); // Right Container for Binary - let rightBinaryContainerElement = document.createElement('div'); + const rightBinaryContainerElement = document.createElement('div'); rightBinaryContainerElement.className = 'binary-container'; this.rightBinaryContainer = $(rightBinaryContainerElement); this.rightBinaryContainer.tabindex(0); // enable focus support from the editor part (do not remove) @@ -94,11 +94,11 @@ export class BinaryResourceDiffEditor extends BaseEditor implements IVerticalSas } public setInput(input: EditorInput, options: EditorOptions): TPromise { - let oldInput = this.getInput(); + const oldInput = this.getInput(); super.setInput(input, options); // Detect options - let forceOpen = options && options.forceOpen; + const forceOpen = options && options.forceOpen; // Same Input if (!forceOpen && input.matches(oldInput)) { @@ -119,11 +119,11 @@ export class BinaryResourceDiffEditor extends BaseEditor implements IVerticalSas } // Render original - let original = resolvedModel.originalModel; + const original = resolvedModel.originalModel; this.renderInput(original.getName(), original.getResource(), original.getSize(), original.getETag(), true); // Render modified - let modified = resolvedModel.modifiedModel; + const modified = resolvedModel.modifiedModel; this.renderInput(modified.getName(), modified.getResource(), modified.getSize(), modified.getETag(), false); }); } @@ -138,8 +138,8 @@ export class BinaryResourceDiffEditor extends BaseEditor implements IVerticalSas } // Pass to ResourceViewer - let container = isOriginal ? this.leftBinaryContainer : this.rightBinaryContainer; - let scrollbar = isOriginal ? this.leftScrollbar : this.rightScrollbar; + const container = isOriginal ? this.leftBinaryContainer : this.rightBinaryContainer; + const scrollbar = isOriginal ? this.leftScrollbar : this.rightScrollbar; ResourceViewer.show({ name, resource, size, etag }, container, scrollbar, (meta) => this.handleMetadataChanged(meta, isOriginal)); } @@ -172,14 +172,14 @@ export class BinaryResourceDiffEditor extends BaseEditor implements IVerticalSas } public layout(dimension: Dimension): void { - let oldDimension = this.dimension; + const oldDimension = this.dimension; this.dimension = dimension; // Calculate left hand container width based on sash move or fallback to 50% by default if (!this.leftContainerWidth || !oldDimension) { this.leftContainerWidth = this.dimension.width / 2; } else { - let sashRatio = this.leftContainerWidth / oldDimension.width; + const sashRatio = this.leftContainerWidth / oldDimension.width; this.leftContainerWidth = this.dimension.width * sashRatio; } @@ -208,7 +208,7 @@ export class BinaryResourceDiffEditor extends BaseEditor implements IVerticalSas private onSashDrag(e: ISashEvent): void { // Update Widths and keep in bounds of MIN_CONTAINER_WIDTH for both sides - let newLeftContainerWidth = this.startLeftContainerWidth + e.currentX - e.startX; + const newLeftContainerWidth = this.startLeftContainerWidth + e.currentX - e.startX; this.leftContainerWidth = Math.max(BinaryResourceDiffEditor.MIN_CONTAINER_WIDTH, newLeftContainerWidth); if (this.dimension.width - this.leftContainerWidth < BinaryResourceDiffEditor.MIN_CONTAINER_WIDTH) { this.leftContainerWidth = this.dimension.width - BinaryResourceDiffEditor.MIN_CONTAINER_WIDTH; diff --git a/src/vs/workbench/browser/parts/editor/binaryEditor.ts b/src/vs/workbench/browser/parts/editor/binaryEditor.ts index dc60e1108dd..42c50fcd567 100644 --- a/src/vs/workbench/browser/parts/editor/binaryEditor.ts +++ b/src/vs/workbench/browser/parts/editor/binaryEditor.ts @@ -49,7 +49,7 @@ export abstract class BaseBinaryResourceEditor extends BaseEditor { public createEditor(parent: Builder): void { // Container for Binary - let binaryContainerElement = document.createElement('div'); + const binaryContainerElement = document.createElement('div'); binaryContainerElement.className = 'binary-container'; this.binaryContainer = $(binaryContainerElement); this.binaryContainer.tabindex(0); // enable focus support from the editor part (do not remove) @@ -60,11 +60,11 @@ export abstract class BaseBinaryResourceEditor extends BaseEditor { } public setInput(input: EditorInput, options: EditorOptions): TPromise { - let oldInput = this.getInput(); + const oldInput = this.getInput(); super.setInput(input, options); // Detect options - let forceOpen = options && options.forceOpen; + const forceOpen = options && options.forceOpen; // Same Input if (!forceOpen && input.matches(oldInput)) { @@ -85,7 +85,7 @@ export abstract class BaseBinaryResourceEditor extends BaseEditor { } // Render Input - let model = resolvedModel; + const model = resolvedModel; ResourceViewer.show({ name: model.getName(), resource: model.getResource(), size: model.getSize(), etag: model.getETag() }, this.binaryContainer, this.scrollbar, (meta) => this.handleMetadataChanged(meta)); return TPromise.as(null); diff --git a/src/vs/workbench/browser/parts/editor/editor.contribution.ts b/src/vs/workbench/browser/parts/editor/editor.contribution.ts index 536fe9573fe..0e7a4f6409e 100644 --- a/src/vs/workbench/browser/parts/editor/editor.contribution.ts +++ b/src/vs/workbench/browser/parts/editor/editor.contribution.ts @@ -95,15 +95,15 @@ export class QuickOpenActionContributor extends ActionBarContributor { } public hasActions(context: any): boolean { - let entry = this.getEntry(context); + const entry = this.getEntry(context); return !!entry; } public getActions(context: any): IAction[] { - let actions: Action[] = []; + const actions: Action[] = []; - let entry = this.getEntry(context); + const entry = this.getEntry(context); if (entry) { if (!this.openToSideActionInstance) { this.openToSideActionInstance = this.instantiationService.createInstance(OpenToSideAction); diff --git a/src/vs/workbench/browser/parts/editor/editorPicker.ts b/src/vs/workbench/browser/parts/editor/editorPicker.ts index 2f65018a3db..81a96b9627f 100644 --- a/src/vs/workbench/browser/parts/editor/editorPicker.ts +++ b/src/vs/workbench/browser/parts/editor/editorPicker.ts @@ -120,8 +120,8 @@ export abstract class BaseEditorPicker extends QuickOpenHandler { return true; } - let resource = e.getResource(); - let targetToMatch = resource ? labels.getPathLabel(e.getResource(), this.contextService) : e.getLabel(); + const resource = e.getResource(); + const targetToMatch = resource ? labels.getPathLabel(e.getResource(), this.contextService) : e.getLabel(); if (!scorer.matches(targetToMatch, normalizedSearchValueLowercase)) { return false; } diff --git a/src/vs/workbench/browser/parts/editor/stringEditor.ts b/src/vs/workbench/browser/parts/editor/stringEditor.ts index d996aef7eed..948fa455160 100644 --- a/src/vs/workbench/browser/parts/editor/stringEditor.ts +++ b/src/vs/workbench/browser/parts/editor/stringEditor.ts @@ -69,17 +69,17 @@ export class StringEditor extends BaseTextEditor { } public setInput(input: EditorInput, options: EditorOptions): TPromise { - let oldInput = this.getInput(); + const oldInput = this.getInput(); super.setInput(input, options); // Detect options - let forceOpen = options && options.forceOpen; + const forceOpen = options && options.forceOpen; // Same Input if (!forceOpen && input.matches(oldInput)) { // TextOptions (avoiding instanceof here for a reason, do not change!) - let textOptions = options; + const textOptions = options; if (textOptions && types.isFunction(textOptions.apply)) { textOptions.apply(this.getControl()); } @@ -106,20 +106,20 @@ export class StringEditor extends BaseTextEditor { } // Set Editor Model - let textEditor = this.getControl(); - let textEditorModel = (resolvedModel).textEditorModel; + const textEditor = this.getControl(); + const textEditorModel = (resolvedModel).textEditorModel; textEditor.setModel(textEditorModel); // Apply Options from TextOptions let optionsGotApplied = false; - let textOptions = options; + const textOptions = options; if (textOptions && types.isFunction(textOptions.apply)) { optionsGotApplied = textOptions.apply(textEditor); } // Otherwise restore View State if (!optionsGotApplied && input instanceof UntitledEditorInput) { - let viewState = this.mapResourceToEditorViewState[input.getResource().toString()]; + const viewState = this.mapResourceToEditorViewState[input.getResource().toString()]; if (viewState) { textEditor.restoreViewState(viewState); } @@ -131,16 +131,16 @@ export class StringEditor extends BaseTextEditor { } protected getCodeEditorOptions(): IEditorOptions { - let options = super.getCodeEditorOptions(); + const options = super.getCodeEditorOptions(); - let input = this.getInput(); - let isUntitled = input instanceof UntitledEditorInput; - let isReadonly = !isUntitled; // all string editors are readonly except for the untitled one + const input = this.getInput(); + const isUntitled = input instanceof UntitledEditorInput; + const isReadonly = !isUntitled; // all string editors are readonly except for the untitled one options.readOnly = isReadonly; let ariaLabel: string; - let inputName = input && input.getName(); + const inputName = input && input.getName(); if (isReadonly) { ariaLabel = inputName ? nls.localize('readonlyEditorWithInputAriaLabel', "{0}. Readonly text editor.", inputName) : nls.localize('readonlyEditorAriaLabel', "Readonly text editor."); } else { @@ -157,12 +157,12 @@ export class StringEditor extends BaseTextEditor { * If smart reveal is true will only reveal the last line if the line before last is visible #3351 */ public revealLastLine(smartReveal = false): void { - let codeEditor = this.getControl(); - let model = codeEditor.getModel(); + const codeEditor = this.getControl(); + const model = codeEditor.getModel(); const lineBeforeLastRevealed = codeEditor.getScrollTop() + codeEditor.getLayoutInfo().height >= codeEditor.getScrollHeight(); if (model && (!smartReveal || lineBeforeLastRevealed)) { - let lastLine = model.getLineCount(); + const lastLine = model.getLineCount(); codeEditor.revealLine(lastLine); } } diff --git a/src/vs/workbench/browser/parts/editor/textDiffEditor.ts b/src/vs/workbench/browser/parts/editor/textDiffEditor.ts index 219940bf448..8e219979834 100644 --- a/src/vs/workbench/browser/parts/editor/textDiffEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textDiffEditor.ts @@ -84,11 +84,11 @@ export class TextDiffEditor extends BaseTextEditor { this.previousDiffAction = new NavigateAction(this, false); // Support navigation within the diff editor by overriding the editor service within - let delegatingEditorService = this.instantiationService.createInstance(DelegatingWorkbenchEditorService, (input: EditorInput, options?: EditorOptions, arg3?: any) => { + const delegatingEditorService = this.instantiationService.createInstance(DelegatingWorkbenchEditorService, (input: EditorInput, options?: EditorOptions, arg3?: any) => { // Check if arg4 is a position argument that differs from this editors position if (types.isUndefinedOrNull(arg3) || arg3 === false || arg3 === this.position) { - let activeDiffInput = this.getInput(); + const activeDiffInput = this.getInput(); if (input && options && activeDiffInput) { // Input matches modified side of the diff editor: perform the action on modified side @@ -98,7 +98,7 @@ export class TextDiffEditor extends BaseTextEditor { // Input matches original side of the diff editor: perform the action on original side else if (input.matches(activeDiffInput.originalInput)) { - let originalEditor = this.getControl().getOriginalEditor(); + const originalEditor = this.getControl().getOriginalEditor(); if (options instanceof TextEditorOptions) { (options).apply(originalEditor); @@ -112,23 +112,23 @@ export class TextDiffEditor extends BaseTextEditor { }); // Create a special child of instantiator that will delegate all calls to openEditor() to the same diff editor if the input matches with the modified one - let diffEditorInstantiator = this.instantiationService.createChild(new ServiceCollection([IWorkbenchEditorService, delegatingEditorService])); + const diffEditorInstantiator = this.instantiationService.createChild(new ServiceCollection([IWorkbenchEditorService, delegatingEditorService])); return diffEditorInstantiator.createInstance(DiffEditorWidget, parent.getHTMLElement(), this.getCodeEditorOptions()); } public setInput(input: EditorInput, options: EditorOptions): TPromise { - let oldInput = this.getInput(); + const oldInput = this.getInput(); super.setInput(input, options); // Detect options - let forceOpen = options && options.forceOpen; + const forceOpen = options && options.forceOpen; // Same Input if (!forceOpen && input.matches(oldInput)) { // TextOptions (avoiding instanceof here for a reason, do not change!) - let textOptions = options; + const textOptions = options; if (textOptions && types.isFunction(textOptions.apply)) { textOptions.apply(this.getControl()); } @@ -155,13 +155,13 @@ export class TextDiffEditor extends BaseTextEditor { } // Editor - let diffEditor = this.getControl(); + const diffEditor = this.getControl(); diffEditor.setModel((resolvedModel).textDiffEditorModel); // Respect text diff editor options let autoRevealFirstChange = true; if (options instanceof TextDiffEditorOptions) { - let textDiffOptions = (options); + const textDiffOptions = (options); autoRevealFirstChange = !types.isUndefinedOrNull(textDiffOptions.autoRevealFirstChange) ? textDiffOptions.autoRevealFirstChange : autoRevealFirstChange; } @@ -195,10 +195,10 @@ export class TextDiffEditor extends BaseTextEditor { private openAsBinary(input: EditorInput, options: EditorOptions): boolean { if (input instanceof DiffEditorInput) { - let originalInput = input.originalInput; - let modifiedInput = input.modifiedInput; + const originalInput = input.originalInput; + const modifiedInput = input.modifiedInput; - let binaryDiffInput = new DiffEditorInput(input.getName(), input.getDescription(), originalInput, modifiedInput, true); + const binaryDiffInput = new DiffEditorInput(input.getName(), input.getDescription(), originalInput, modifiedInput, true); this.editorService.openEditor(binaryDiffInput, options, this.position).done(null, onUnexpectedError); @@ -209,17 +209,17 @@ export class TextDiffEditor extends BaseTextEditor { } protected getCodeEditorOptions(): IEditorOptions { - let options: IDiffEditorOptions = super.getCodeEditorOptions(); + const options: IDiffEditorOptions = super.getCodeEditorOptions(); - let input = this.input; + const input = this.input; if (input instanceof DiffEditorInput) { - let modifiedInput = input.modifiedInput; - let readOnly = modifiedInput instanceof StringEditorInput || modifiedInput instanceof ResourceEditorInput; + const modifiedInput = input.modifiedInput; + const readOnly = modifiedInput instanceof StringEditorInput || modifiedInput instanceof ResourceEditorInput; options.readOnly = readOnly; let ariaLabel: string; - let inputName = input && input.getName(); + const inputName = input && input.getName(); if (readOnly) { ariaLabel = inputName ? nls.localize('readonlyEditorWithInputAriaLabel', "{0}. Readonly text compare editor.", inputName) : nls.localize('readonlyEditorAriaLabel', "Readonly text compare editor."); } else { @@ -236,7 +236,7 @@ export class TextDiffEditor extends BaseTextEditor { private isFileBinaryError(error: Error): boolean; private isFileBinaryError(error: any): boolean { if (types.isArray(error)) { - let errors = error; + const errors = error; return errors.some((e) => this.isFileBinaryError(e)); } @@ -275,16 +275,16 @@ export class TextDiffEditor extends BaseTextEditor { } public getSecondaryActions(): IAction[] { - let actions = super.getSecondaryActions(); + const actions = super.getSecondaryActions(); const control = this.getControl(); let inlineModeActive = control && !control.renderSideBySide; - let inlineLabel = nls.localize('inlineDiffLabel', "Switch to Inline View"); - let sideBySideLabel = nls.localize('sideBySideDiffLabel', "Switch to Side by Side View"); + const inlineLabel = nls.localize('inlineDiffLabel', "Switch to Inline View"); + const sideBySideLabel = nls.localize('sideBySideDiffLabel', "Switch to Side by Side View"); // Action to toggle editor mode from inline to side by side - let toggleEditorModeAction = new Action('toggle.diff.editorMode', inlineModeActive ? sideBySideLabel : inlineLabel, null, true, () => { + const toggleEditorModeAction = new Action('toggle.diff.editorMode', inlineModeActive ? sideBySideLabel : inlineLabel, null, true, () => { this.getControl().updateOptions({ renderSideBySide: inlineModeActive }); -- GitLab