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

Function installModes

content_scripts/vimium_frontend.js:160–174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

158});
159
160function installModes() {
161 // Install the permanent modes. The permanently-installed insert mode tracks focus/blur events,
162 // and activates/deactivates itself accordingly.
163 normalMode = new NormalMode();
164 normalMode.init();
165 // Initialize components upon which normal mode depends.
166 Scroller.init();
167 FindModeHistory.init();
168 new InsertMode({ permanent: true });
169 if (isEnabledForUrl) {
170 new GrabBackFocus();
171 }
172 // Return the normalMode object (for the tests).
173 return normalMode;
174}
175
176// document is null in our tests.
177let previousUrl = globalThis.document?.location.href;

Callers 2

checkIfEnabledForUrlFunction · 0.85
initializeModeStateFunction · 0.85

Calls 1

initMethod · 0.45

Tested by

no test coverage detected