aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
AgeCommit message (Collapse)Author
2016-10-01Merge pull request #2283 from smblott-github/fix-find-mode-hangsStephen Blott
Find mode can hang Vimium (fixed).
2016-10-01Fix find-mode hangs.Stephen Blott
"/" followed immediately by "i" can hang Vimium. The problem is that launching find mode is asynchronous (we wait until the HUD is available). Because normal mode is still active, we can enter insert mode *before* the find-mode HUD receives the focus. The result is that we end up in both find mode and insert mode, the HUD has the focus, but the HUD is in insert mode, so it ignores keyboard events (including `Escape`). The only way out is to click the page's body and then type `Escape`. This commit demonstrates the problem: 7d2b00411eae3293fa4c7b1f61b384c0c495b5a2. This happens in practice, for example while a busy page is loading. This commit fixes this by ensuring that find-mode blocks keyboard events immediately (and synchronously) on launch.
2016-09-30Remove Coffeescript 1.10 dependency.Stephen Blott
Fixes #2273. Fixes #2281. This fixes the build with Coffeescript 1.11, so we can remove the hard-wired dependency and notes.
2016-09-26Use title attribute for link text.Stephen Blott
Google seems to be using a lot of "title" attributes on buttons. This makes it possible to type the text in filtered link-hints mode. (And you can often guess the text; e.g. "close"). We could also show the title text. That is very visually noisy though, in practice.
2016-09-26Tweak jsaction detection and add tests.Stephen Blott
This tweaks the jsaction detection, in particular excluding elements where the "actionName" is "_". I see a lot of these, and clicking them doesn't do anything. Also, added corresponding tests.
2016-09-26Fix comment.Stephen Blott
Thinking about it more carefully, this algorithm is always O(n^2).
2016-09-25Active hint marker may be in another frame.Stephen Blott
Do not set the style on the active hint marker if it's in another frame.
2016-09-25Reinstate highlighting of first hint.Stephen Blott
Applies to filtered hints only.
2016-09-25Do not reset tab index on modifiers.Stephen Blott
The prevents the active element from being reset when we rotate hint markers.
2016-09-25Make tab-selected hint visible.Stephen Blott
When the user selects an active hint with Tab (for filtered hints), adjust its z-index such at it is top of the stack.
2016-09-25Refactor z-index allocation to a separate function.Stephen Blott
2016-09-25Don't forget the tab count on <Space>.Stephen Blott
2016-09-25Hint rotation, tweaks for readability.Stephen Blott
2016-09-25Space rotates hints (to make hidden hints visible).Stephen Blott
It is common for link-hint markers to be close togother, and overlapping. Here, `<Space>` rotates hint markers such that hidden markers become visible. For filtered hints we additionally require a modifier (because `<space>` on its own is already a token separator). The calculation of overlapping hints is quite expensive: O(n^2) in the best case and O(n^3) in the worst cast. The worst case is extraordinarily unlikely to arise in practice.
2016-09-24Fix key handling for 3-key mappings.Stephen Blott
This only affects key mappings of three keys or longer. Consider: map goa something map gob something Previously, we launched the vomnibar (`o`) on the after `go`, making these mappings unusable. This commit fixes that: `go` no longer launches the Vomnibar, but waits instead to see what the next key is.
2016-09-24Merge pull request #2250 from smblott-github/better-global-marksStephen Blott
Use prefix matching for global marks.
2016-09-24Merge branch 'dpogue-scrollingElement'Stephen Blott
2016-09-24Tweak #2168 (scrolling via scrollingElement).Stephen Blott
Instead of setting a property of document for `scrollingElement` (if it is not defined), just use a function and make the decision dynamically instead.
2016-09-22Use document.scrollingElement for scrollingDarryl Pogue
This fixes Vimium with the 'Experimental Web Platform Features' flag enabled, and ensures compatibility across quirks mode scrolling (via document.body) and standards-compliant scrolling (via document.documentElement).
2016-09-14Require exact match when we will be scrolling.Stephen Blott
If the user is jumping to a scroll position within a tab, then we need an exact match on the URL (because otherwise the scroll position doesn't really have a meaning). Otherwise we only require a prefix match, a la #2250.
2016-09-09Merge pull request #2242 from gdh1995/hint-label-for-not-disabledStephen Blott
hint a label only if its control is not disabled
2016-09-09hint a label only if its control is not disabledgdh1995
example: ``` html <label><input type=checkbox disabled />exlpanation</label> ```
2016-08-16Add support for opening details elementsBouke van der Bijl
2016-06-17Revert "Adds important to hint marker font-family declaration"Stephen Blott
This reverts commit 2526bb3b0433e5cf645dfd7007ec42860b11ba2a. See #2164. It seems this is no longer necessary.
2016-06-14Adds important to hint marker font-family declarationScott Pinkelman
2016-05-27Fix visual line mode.Stephen Blott
Due to a typo, VisualLineMode is broken in 1.55. Fixes #2146.
2016-05-12Guard against non-string values.Stephen Blott
If the link's value is not a string, then the previous version of this fails. The new test will be false for such links.
2016-05-12Revert "Improves next/previous links by targetting button elements and ↵Stephen Blott
adding single left/right angle quotation marks" This reverts commit ee8c235aeaf52d2bc867a00c37731690e337c7ff. This reverts #2117. This breaks next/prev on Reddit (it chooses a different link). Reddit is an important site, so we should unwind this for now. Mention @sco-tt.
2016-05-07Merge pull request #2118 from smblott-github/fix-ui-component-init-issuesStephen Blott
Fix UI-component initialization issues (maybe).
2016-05-05install the real selectionchange listener after window.findgdh1995
2016-05-02Removes unnecessary parentheses and makes precedence of || and && explicitScott Pinkelman
2016-05-01Make findAndFollowLink look at element values so <input> can be used for ↵Scott Pinkelman
next/prev links
2016-04-28Fix UI-component initialization issues.Stephen Blott
This fixes some UI component initialization issues. It's a long story... The problem. - Go to this page: http://www.thejournal.ie/seanad-election-results-2016-2737768-Apr2016/ - Click one of the links from the "Most Popular" box on the right. - Navigate back (`H`) and, as the original page is loading, activate the Vomnibar. In 1.54 this renders Vimium unusable. In `master` this renders the Vomnibar unsable, but the rest of Vimium usable. It seems the source of the issue is that we're initializing UI components too soon. We need to wait until the `readyState` is "complete". With this PR: - The Vomnibar is initialised when the `readyState` is "complete" (in the top frame only, and only if Vimium is enabled). Requests arriving prior to then are silently discarded. - The HUD is also initialized only when the `readyState` is "complete"; however, requests arriving before then are queued. So, if the user immediately enters insert mode, then the "Insert mode" indicator will eventually be displayed. - The help dialog silently discards requests until the `readyState` is "complete. I'm posting this as a PR because: 1. It needs some visibility. 2. With this, if the `readyState` *never* reaches "complete", then the Vomnibar would be unusable. And that's pretty serious.
2016-04-28Make vimiumFlash a class.Stephen Blott
There are circumstances when we hav two (identical) vimiumFlash elements displayed: specifically, when using the waitForEnter keyboard blocker. So, we should use a class (rather than an id) to style the flash element.
2016-04-26Improves next/previous links by targetting button elements and adding single ↵Scott Pinkelman
left/right angle quotation marks
2016-04-26Merge pull request #2107 from smblott-github/modernize-help-dialog-stylingStephen Blott
Modernize help dialog styling
2016-04-26Help dialog; use Vimium-blue for links.Stephen Blott
On the help dialog, use the same blue of the "Vim" of "Vimium" for links.
2016-04-26Help dialog; use fixed-width font for keys.Stephen Blott
2016-04-25Help dialog; revert font colour for command names.Stephen Blott
If we're not using the previous font for other links on the help dialog, then it doesn't make sense to use that font for command names either.
2016-04-25Help dialog; tweak key styling.Stephen Blott
2016-04-25Help dialog; reposition close button.Stephen Blott
2016-04-25Help dialog revert styling of links.Stephen Blott
2016-04-25Make zoom-in/out images clickable.Stephen Blott
Make zoomable images clickable: e.g. http://i.imgur.com/LdCeLlk.jpg/.
2016-04-24Filtered hints; tweak scoring.Stephen Blott
Re-order the tests such that we don't even do the scoring if there are no query (search) terms. This might (very) marginally speed up link-hints launch.
2016-04-24Fix tests following 029741ea2d93031f0c9d5e57ba9cf75546976798.Stephen Blott
Following 029741ea2d93031f0c9d5e57ba9cf75546976798 (which seemed trivial), I forgot to check the tests (which were in fact broken, and correctly broken). If there is no link-text key queue, then *all* links should match.
2016-04-24Filter filtered-mode link hints.Stephen Blott
Only keep non-empty link words. Empty link words cannot be matched, and leading empty link words disrupt the scoring of matches at the start of the text. E.g. "9 new messages" with a query "new" should score as a match at the start of the text.
2016-04-23Help dialog: CSS tweaks.Stephen Blott
2016-04-23Tweak help-dialog font size.Stephen Blott
Make the font size (and color) match those used in the footer.
2016-04-23Fix help-dialog scroll bars and min width.Stephen Blott
2016-04-23Show tip re. clicking command names.Stephen Blott
It's pretty undiscoverable that you can click command names to yank them. So, this adds a tip to the bottom of the help dialog. Also, change the cursor to a pointer when hovering over command names.