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

Method hintStrings

content_scripts/link_hints.js:831–845  ·  view source on GitHub ↗
(linkCount)

Source from the content-addressed store, hash-verified

829 // strings may be of different lengths.
830 //
831 hintStrings(linkCount) {
832 let hints = [""];
833 let offset = 0;
834 while (((hints.length - offset) < linkCount) || (hints.length === 1)) {
835 const hint = hints[offset++];
836 for (const ch of this.linkHintCharacters) {
837 hints.push(ch + hint);
838 }
839 }
840 hints = hints.slice(offset, offset + linkCount);
841
842 // Shuffle the hints so that they're scattered; hints starting with the same character and short
843 // hints are spread evenly throughout the array.
844 return hints.sort().map((str) => str.reverse());
845 }
846
847 getMatchingHints(hintMarkers) {
848 const matchString = this.hintKeystrokeQueue.join("");

Callers 2

fillInMarkersMethod · 0.95
dom_tests.jsFile · 0.80

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected