aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-12-12Merge pull request #2370 from smblott-github/float-find-mode-matches-rightStephen Blott
Float find-mode matches to the right.
2016-12-12Float find-mode matches to the right.Stephen Blott
This floats the "5 Matches" text in the find-mode HUD to the right. This looks nicer, because the "5 Matches" text doesn't move as you type. As it happens, it also fixes an issue which arose a few months ago (for unknown reasons) with the positioning of the cursor in find mode. The cursor position was becoming "jammed" after the first character as you type.
2016-12-11Tweak custom-search-engine help HTML.Stephen Blott
2016-12-11Better wording fo command description.Stephen Blott
2016-12-11Documentation for updates.Stephen Blott
2016-12-11Use registryEntry.optionList.Stephen Blott
This means that we get the new tabs in the same order as they are specified in the key mapping.
2016-12-11Extend createTab to open specific pages.Stephen Blott
Example: map a createTab http://edition.cnn.com/ http://www.bbc.co.uk/news which creates two new tabs, but preloaded with these specific URLs. `2a` creates four new tabs, two copies of each. Limitation: - We cannot control the order of the tabs, so we might get CNN then BBC, or BBC then CNN. This happens because command options are stored in an object, and we cannot control the order of the keys. Also, with: map a createTab http://www.bbc.co.uk/news http://www.bbc.co.uk/news we only get one new tab (same reason as above).
2016-12-11Add the raw option list to the command registry.Stephen Blott
Keep the option list (in addition to the parsed command options) because some commands may depend upon the command option order. One currect example is #2318.
2016-12-11Merge pull request #2368 from smblott-github/rework-key-mapping-parsingStephen Blott
Rework key-mapping parsing and help-dialog HTML
2016-12-11Ensure that we get the last for a key.Stephen Blott
(Because we're scanning backwards throught the mappings, we shouldn't overwrite an existing mapping.)
2016-12-11Remove Utils.nextTick() to fix tests.Stephen Blott
2016-12-11Rework help-dialog HTML.Stephen Blott
Previously, the dynamic HTML for the help dialog was generated on the background page. The HTML itself was tangled in with program logic. Here, we move all of the HTML to HTML5 templates; also, we build the help-dialog contents in the help dialog itself, not on the background page. Note: #2368 is included here too. (Background: I'm trying to clean up some of the command and help-dialog logic in preparation for addressing the issue of how to document command options, see #2319.)
2016-12-11Rework key-mapping parsing.Stephen Blott
There are two changes here: 1. Treat built-in key mappings and custom key mappings in the same way; that is, we prepend the built-in mappings to the custom mappings and then parse them all together. This results in a number of simplifications due to previous duplication of logic and the elimination of special cases. 2. Parse key mappings in reverse order, so we can just ignore key mappings after first encountering a key sequence. So, `map`, `unmap` and `unmapAll` are all treated in more or less the same way. This is preparatory to reworking some aspects of the help page. In particular, regardless of the order of maps, unmaps, etc., this approach makes it easier to find the mapping in effect for a key sequence (and be able to recreate the order of those mappings).
2016-12-10Merge pull request #2326 from smblott-github/move-search-engines-to-bg-utilsStephen Blott
Move SearchEngines to bg-utils.coffee.
2016-12-10Use 'map X passNextKey normal'.Stephen Blott
2016-12-10Tweak #2338.Stephen Blott
2016-11-09update creditsRamiro Araujo
2016-11-09treat select element as an input, setting focus to itRamiro Araujo
2016-10-23Makes sure all custom link hint characters defined in settings are lower ↵Scott Pinkelman
case when link hints are generated
2016-10-23Move SearchEngines to bg-utils.coffee.Stephen Blott
`SearchEngines` was previously in `utils.coffee`, which means it was loaded in *every* content frame. This is unnecessary, since it is only used on the background page. So this PR moves it there. Also: - Simplify some unnecessarily complex logic in `vomnibar.coffee`. - Re-use `Utils.parseLines()` to parse the custom search engine configuation text.
2016-10-23Better line parsing (add note in README).Stephen Blott
2016-10-23Better line parsing (add note in README).Stephen Blott
2016-10-23Merge pull request #2315 from smblott-github/better-line-parsingStephen Blott
Better line parsing (for custom key mappings)
2016-10-23Better line parsing (add tests).Stephen Blott
2016-10-23Better line parsing (simplified).Stephen Blott
2016-10-17Better line parsing.Stephen Blott
1. Explicitly remove comments. 2. A trailing backslash means the current line continues on the next line. E.g. a \ b \ c is a single line `a b c`. This helps alleviate the fact that configuration lines can be very long, whereas the *Custom key mappings* input is quite narrow. TODO: We should use the same line parser in the custom-search-engines input.
2016-10-15Note mapKey in README.md.Stephen Blott
2016-10-15enterNormalMode; tweak indicator.Stephen Blott
2016-10-15enterNormalMode; new command - implementationStephen Blott
Here's the problem... Many sites define their own keyboard shortcuts, for example Google Play Music defines `gh` for "go home". On such sites, it's natural to set up pass keys for `g` and `h`. But that makes any Vimium key bindings which begin with `g` inaccessible. Here, we add a new command `enterNormalMode` which installs a new normal-mode instance (without any pass keys). This executes a single normal-mode command then exits. Example: map \ enterNormalMode map | enterNormalMode count=999999 Assuming `g` and `o` are pass keys: - `gh` or `o` - use the page's binding - `\gg` - scroll to top - `2\ggo` - scroll to the top and open the Vomnibar - `\g<Escape>o` - open the Vomnibar - `\<Escape>o` - use the page's bindings - `\\\\\\<Escape>o` - use the page's bindings (new normal-mode instances displace previous ones) This required some changes to the scroller. Previously, we only ever had one normal-mode instance, and could arrange statically that the scroller's key listeners were above normal-mode's key listeners in the handler stack. Here, we fix this by adding and removing the scroller's listeners dynamically, so they're always at the top of the handler stack.
2016-10-15No-op; rearrange content-script command arguments.Stephen Blott
This is a no-op. It arranges that the registry entry for each command is passed to the command, for every command. That required a small ammount of reworking in a couple of cases.
2016-10-10Don't set the update_url by default.Andrew Z Allen
Setting the update_url by default can lead to accidentally updating to the version you host on github. Setting this to a safe default of "" and leaving a comment explaining why.
2016-10-10Merge pull request #2306 from smblott-github/add-key-translationStephen Blott
Add "mapkey" command for key mappings.
2016-10-10Add TODO.Stephen Blott
2016-10-10Rename 'translate' to 'mapkey'.Stephen Blott
2016-10-10Merge pull request #2307 from ↵Stephen Blott
smblott-github/disable-grab-back-focus-in-all-frames Disable grab-back-focus in all frames.
2016-10-10Disable grab-back-focus in all frames.Stephen Blott
When the user begins interacting with one frame, we disable the grab-back-focus mode in *all* frames. Previously, grab-back-focus was preventing users from selecting inputs in frames other than the active frame. Fixes #2296 (possibly).
2016-10-09Tweak (simplify) #2306.Stephen Blott
2016-10-09Extend key translation to include Escape.Stephen Blott
Here, these map to escape: translate x <c-[> translate <c-c> <c-[>
2016-10-09Add translate command for key mappings.Stephen Blott
Under *Custom key mappings* (on the options page), this implements: translate x y Whenever the users types `x` in normal mode or in visual mode, the `x` is replaced by `y`. For example: map ç l (which apparently would be helpful on Brazilian keyboards). Issues: - Do we want yet another hack like this? This would be documented only on the wiki. - If we allowed `translate <c-c> <c-[>` (and extended `isEscape()` to use the translation), then we'd get the `exitMode` command for free (#2253). - Alternatively, instead of adding a new "command" called `translate`, we could overload the existing `map` command. Since these are single-key mappings, there's no ambiguity. (Although, I guess there's a risk some user has junk in their key mappings and would be taken by surprise). Inspired by isssue posted by @vhoyer (#2305). Fixes #2305.
2016-10-09Move logging to the frame's port.Stephen Blott
Comminication by the frame's port is faster, and no response is sent.
2016-10-09Remove description from registry entry for key-state mapping.Stephen Blott
We do not need the registryEntry's decription in the content scripts, so remove it (saving a marginal amount of memory and time).
2016-10-08Grab back focus prevents focusing embeds."Stephen Blott
Partially addresses #2303.
2016-10-08Better positioning of link-hints flash rect.Stephen Blott
When an <a> spans the end of a line and the start of the next line, we now highlight both parts of the link (instead of just the first). Also, refactor code for calculating the position of the viewport into a separate utility in DomUtils.
2016-10-08Merge pull request #2301 from gdh1995/documentElement-offsetStephen Blott
handle documentElement's top/left margin correctly
2016-10-08Refactor (and fix) key-parsing regexp.Stephen Blott
Fixes #2299. Also, separate this regexp out into its constituent parts, because it is becoming too different to read.
2016-10-08handle documentElement's top margin correctlygdh1995
2016-10-05Note backspace key (fix typo).Stephen Blott
2016-10-05Note backspace key.Stephen Blott
2016-10-02Tweak logging.Stephen Blott
2016-10-02More key-sequance parser tests.Stephen Blott