| 474 | |
| 475 | // Creates a link marker for the given link. |
| 476 | createMarkerFor(desc) { |
| 477 | const marker = new HintMarker(); |
| 478 | const isLocalMarker = desc.frameId === frameId; |
| 479 | if (isLocalMarker) { |
| 480 | const localHint = HintCoordinator.getLocalHint(desc); |
| 481 | const el = DomUtils.createElement("div"); |
| 482 | el.style.left = localHint.rect.left + "px"; |
| 483 | el.style.top = localHint.rect.top + "px"; |
| 484 | // Note that Vimium's CSS is user-customizable. We're adding the "vimiumHintMarker" class here |
| 485 | // for users to customize. See further comments about this in vimium.css. |
| 486 | el.className = "vimium-reset internal-vimium-hint-marker vimiumHintMarker"; |
| 487 | Object.assign(marker, { |
| 488 | element: el, |
| 489 | localHint, |
| 490 | }); |
| 491 | } |
| 492 | |
| 493 | return Object.assign(marker, { |
| 494 | hintDescriptor: desc, |
| 495 | linkText: desc.linkText, |
| 496 | stableSortCount: ++this.stableSortCount, |
| 497 | }); |
| 498 | } |
| 499 | |
| 500 | // Handles all keyboard events. |
| 501 | onKeyDownInMode(event) { |