diff options
| author | Jez Ng | 2012-04-27 16:37:45 -0400 |
|---|---|---|
| committer | Jez Ng | 2012-04-27 16:37:45 -0400 |
| commit | bd4cbd3f03e3bb92ca90dbd04d5118a32da4d487 (patch) | |
| tree | c980d48637e4f69eb69c1fee08f060ba6be67e51 | |
| parent | 36ba08a4e14f7de05b3357b35666e7351083998d (diff) | |
| download | vimium-bd4cbd3f03e3bb92ca90dbd04d5118a32da4d487.tar.bz2 | |
Touch up on previous commit.
| -rw-r--r-- | lib/domUtils.js | 7 | ||||
| -rw-r--r-- | linkHints.js | 2 | ||||
| -rw-r--r-- | vimium.css | 3 |
3 files changed, 7 insertions, 5 deletions
diff --git a/lib/domUtils.js b/lib/domUtils.js index 06bffa42..4ab92682 100644 --- a/lib/domUtils.js +++ b/lib/domUtils.js @@ -105,16 +105,17 @@ var domUtils = { } }, - // momentarily flash a border around an element to give user some visual feedback - flashElement: function(element, rect) { + // momentarily flash a rectangular border to give user some visual feedback + flashRect: function(rect) { var flashEl = document.createElement("div"); flashEl.id = "vimiumFlash"; + flashEl.className = "vimiumReset"; flashEl.style.left = rect.left + window.scrollX + "px"; flashEl.style.top = rect.top + window.scrollY + "px"; flashEl.style.width = rect.width + "px"; flashEl.style.height = rect.height + "px"; document.body.appendChild(flashEl); - setTimeout(function() { flashEl.parentNode.removeChild(flashEl); delete flashEl; }, 400); + setTimeout(function() { flashEl.parentNode.removeChild(flashEl); }, 400); }, }; diff --git a/linkHints.js b/linkHints.js index 8f91264c..7d6b431f 100644 --- a/linkHints.js +++ b/linkHints.js @@ -207,7 +207,7 @@ var linkHints = { // TODO figure out which other input elements should not receive focus if (clickEl.nodeName.toLowerCase() === 'input' && clickEl.type !== 'button') clickEl.focus(); - domUtils.flashElement(clickEl, matchedLink.rect); + domUtils.flashRect(matchedLink.rect); this.linkActivator(clickEl); if (this.shouldOpenWithQueue) { this.deactivateMode(delay, function() { @@ -381,8 +381,9 @@ body.vimiumFindMode ::selection { width: 90% !important; } -#vimiumFlash { +div#vimiumFlash { box-shadow: 0px 0px 4px 2px #4183C4; + padding: 1px; background: transparent; position: absolute; z-index: 99999; |
