MCPcopy
hub / github.com/philc/vimium / hide

Function hide

content_scripts/hud.js:115–135  ·  view source on GitHub ↗
(immediate, updateIndicator)

Source from the content-addressed store, hash-verified

113 // If :updateIndicator is truthy, then we also refresh the mode indicator. The only time we don't
114 // update the mode indicator, is when hide() is called for the mode indicator itself.
115 hide(immediate, updateIndicator) {
116 if (immediate == null) {
117 immediate = false;
118 }
119 if (updateIndicator == null) {
120 updateIndicator = true;
121 }
122 if ((this.hudUI != null) && (this.tween != null)) {
123 clearTimeout(this._showForDurationTimerId);
124 this.tween.stop();
125 if (immediate) {
126 if (updateIndicator) {
127 Mode.setIndicator();
128 } else {
129 this.hudUI.hide();
130 }
131 } else {
132 this.tween.fade(0, 150, () => this.hide(true, updateIndicator));
133 }
134 }
135 },
136
137 // These parameters describe the reason find mode is exiting, and come from the HUD UI component.
138 hideFindMode({ exitEventIsEnter, exitEventIsEscape }) {

Callers

nothing calls this directly

Calls 4

stopMethod · 0.80
fadeMethod · 0.80
setIndicatorMethod · 0.45
hideMethod · 0.45

Tested by

no test coverage detected