aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
AgeCommit message (Collapse)Author
2016-03-05Key bindings; rewire vomnibar (tweaked).Stephen Blott
2016-03-05Key bindings; rewire vomnibar.Stephen Blott
2016-03-05Key bindings; remove legacy code.Stephen Blott
2016-03-05Key bindings; fix passkeys.Stephen Blott
2016-03-05Key bindings; partially functioning w/ backgound commands.Stephen Blott
2016-03-05Key bindings; initial partially-functioning version.Stephen Blott
2016-03-05Key bindings; initial "generic" class.Stephen Blott
This implements a generic front-end class for key handling (a la normal mode). Also: - supports count prefixes (or not) - supports multi-key mappings (longer than two) Also included is a very poor-man's demo. See the bottom of mode_key_handler.coffee for some hard-wired key bindings. IMPORTANT: This does not actually work as Vimium. It's just a demo.
2016-03-05Improved test for messages intended for background page.Stephen Blott
The options page receives messages intended for the background page (and we're getting console warnings). This is a more general test for when the front end should ignore such messages. Fixes #2034.
2016-03-04Merge pull request #2029 from smblott-github/refactor-link-hintsStephen Blott
A small refactor link hints.
2016-03-04Refactor hints; no need to guard against no rect.Stephen Blott
- The check for whether a rect is defined is only used in one of the three cases. So we don't need it. - Also, better veriable name.
2016-03-04Do not use standalone @.Stephen Blott
The styles guide says not to use standalone `@`. So this changes the occurrences I could find (with sed) to `this`. Occurrences within files with major outstanding PRs are omitted.
2016-03-03Remove methods which aren't used.Stephen Blott
2016-03-01Refactor hints; add `userMightOverType`.Stephen Blott
Previously, we set a variable `delay` and then did some logical gymnastics to get the correct effect. However, in fact, all we care about is whether the user might over-type the links text. So changing to using that as a Boolean flag greatly simplifies the logic. And we lose about 10 LoC.
2016-03-01Refactor hints; consistent variable naming.Stephen Blott
While we're changing this code, we can renamed the parameter here to be consistent with its naming elsewhere.
2016-03-01Refactor hints; remove trailing whitespace.Stephen Blott
Somehow,
2016-03-01Refactor hints; remove legacy code.Stephen Blott
Previously (quite some time ago) we reused the LinkHints object. But for some time it's been a class, and we never reuse instances. Therefore, we can remove the code related to resetting the object's state.
2016-03-01Refactor hints; fix exit sequence.Stephen Blott
Previously, the exit sequence when a link was "clicked" was spread over several functions with several callbacks. This made it difficult to verify that the correct actions were happening in the correct order. Indeed, they weren't in at least one case (we were still showing hints while "waiting for enter"). This fixes that by putting all of the various deactivation orders into one place, `@activateLink()`, and simplifies `@deactivateMode()` accordingle.
2016-02-28Remove some legacy (and unused) code.Stephen Blott
2016-02-28Fix for <count>F.Stephen Blott
We were immediately restarting link-hints mode if a count was present. Unfortunately, that meant that we were detecting our own link-hint click and exiting immediately. So, with a count of 6, we were only getting 3 link-hint activations. To avoid this, we add a short delay (just nextTick). Also, move some other stuff arund to make sure this works in all cases (e.g. wait-for-enter).
2016-02-28Merge pull request #2026 from smblott-github/fix-2023Stephen Blott
Refactor focusFrame - Fix #2023.
2016-02-28Refactor focusFrame.Stephen Blott
Only the `flashFrame` part needs to be guarded against the DOM being ready. So we can take the `flashFrame` part out as a regular function. Fixes #2023 (although I don't fully understand why that's happening).
2016-02-28Pass to count to scroll commands.Stephen Blott
Currently, `10j` keeping `j` held down scrolls quickly for a time then reduces back the regular hold-`j` scroll speed. Therefore, the user cannot use a count to influence the smooth-scrolling scroll speed. This PR fixes that by passing the count to the scroll functions. Consequently, we adjust the actual scroll amount (which affects the scroll speed) rather than calling the scroll commands several times (which doesn't).
2016-02-26Change followLink to use the same method as LinkHints clickingmrmr1993
2016-02-22Remove legacy reference to edit mode.Stephen Blott
Omitted from #1961.
2016-02-21Fix divide by zero.Stephen Blott
If text.length is 1, here, then we divide by `log 1` - which is zero. So add one.
2016-02-20Remove (unused) `tabInfoMap`.Stephen Blott
It appears `tabInfoMap` (and related machinery) is not being used. This removes it.
2016-02-20Refactor command-option parsing.Stephen Blott
When we introduced command options (for mapping keys to custom-search engines), the parsing was done in the Vomnibar code. This moves the parsing to `commands.coffee`, which is where it should always have been. This is a preliminary step with a view to adding a new `count` command option.
2016-02-20hideHUD option applies to insert mode only.Stephen Blott
This makes the `hideHud` option apply only to insert mode (when entered with `i`). Fixes #1953. Fixes #487. We could rename the option itself and add migration code, but that seems overkill. An alternative would be to remove this option entirely.
2016-02-18Wait-for-enter: hold flash in typing protector.Stephen Blott
2016-02-18Wait-for-enter: for filtered hints.Stephen Blott
This affects filtered hints only. If a hint is triggered because the user typed the link text, then: - highlight the link - but wait until the user types `Enter` before activating the link.
2016-02-18PassNextKey; fix tests.Stephen Blott
Oversight from 116ac2c2a279f8497ffd5396f43ac4fd7fd5de67.
2016-02-18PassNextKey; allow multiple mappings.Stephen Blott
This allows: map a passNextKey map b passNextKey (Previously, we only picked up the first mapping.)
2016-02-18PassNextKey; handle pass-next-key in insert mode.Stephen Blott
(First "fully" functional version.)
2016-02-18PassNextKey; move key parsing to keyboard_utils.coffee.Stephen Blott
Previously, key event parsing was embedded in the normal-mode key handlers. Here, we move it to a new function (getKeyCharString) in KeyboardUtils so that it can also be used from elsewhere... In particular for detecting the pass-next-key key in insertmode.
2016-02-18PassNextKey; initial implementation.Stephen Blott
This implements a passNextKey command (initially for normal mode only), as discussed in #1955.
2016-02-16Use `for own ... of` instead of `for ... of`mrmr1993
2016-02-14Split filtered hints on non-word and hint characters.Stephen Blott
This affects the scoring system for filtered link hits, and therefore affects their usability. Example link text: "We open all day", say 7Eleven Previously: "We open all day", say 7Eleven With this PR: we open all day say Eleven Previously: the typed text `we` and `day` would receive poor scores (not the start of a word, and not a whole word. Now, these get high scores, so are more likely to be selected as the active link. Also, `7Eleven` cannot be typed (because `7` is a hint character). With this PR, the typed text `we` `day` now get high scores, as they should.
2016-02-11Change HelpDialog. to @ for methods inside the HelpDialog objectmrmr1993
2016-02-11Only load help dialog iframe when the dialog is to be shownmrmr1993
2016-02-11Show vomnibar above the help dialog, remove an unnecessary CSS rulemrmr1993
2016-02-03Fix closing the help dialogmrmr1993
2016-02-03Prevent nested help dialog iframesmrmr1993
2016-02-03Move help dialog into an iframemrmr1993
2016-02-03Move toggleHelpDialog to HelpDialog.togglemrmr1993
2016-02-03Move frameId check from toggleHelpDialog to its message listenermrmr1993
2016-02-03Move isShowingHelpDialog to HelpDialog.showingmrmr1993
2016-02-03Rename VimiumHelpDialog to HelpDialogmrmr1993
2016-02-03Remove redundant functions show/hideHelpDialogmrmr1993
2016-02-03Show/hide advanced commands with CSS class, other tidyingmrmr1993
2016-02-03Update only help dialog contents when showingmrmr1993