aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-03-17Refactor setIcon to the background page.Stephen Blott
There's no need for the setting of the icon to be driven from the content script. We first know the enabled state in the background page, so set the icon there immediately.
2016-03-17Minor refactoring.Stephen Blott
This tidies up some logic that was showing its age.
2016-03-17Merge pull request #2053 from smblott-github/use-port-for-framesStephen Blott
Use port for frames
2016-03-17More tweaks for #2053.Stephen Blott
2016-03-17Tweaks for #2053.Stephen Blott
2016-03-17Simplify domReady handling.Stephen Blott
2016-03-17Tweaks.Stephen Blott
2016-03-17No need to block until `frameId?`.Stephen Blott
Now that we've moved Frame.init() back to before checkIfEnabledForUrl, there's no longer a need to check that frameId has been initialised. It must have been.
2016-03-17Move isEnabledForUrl to Frame.port.Stephen Blott
2016-03-17Fix omission from 3768b54aa1ac12cdd809e7108a6a9fd629a1164f.Stephen Blott
2016-03-17Open frames port pre documentReady.Stephen Blott
The intention is to move checkIfEnabledForUrl to the frames port. That needs to run pre domReady, so first -- here -- we separate the two ports.
2016-03-17Add filter for top frame when registering a frame.Stephen Blott
We treat the top frame specially (because it always has a frameId of 0). See point "Two" in this comment: - https://github.com/philc/vimium/pull/2053#issuecomment-196707223
2016-03-17Do not unregister the main/top frame.Stephen Blott
We never unregister the main/top frame. If the tab is navigating to another page, then there'll be a new top frame (with the same Id) along soon. If the tab is closing, then we'll tidy up in the chrome.tabs.onRemoved listener, below. This approach avoids a dependency on the order in which register and unregister events happens. See comment in #2053.
2016-03-17Tweaks and fixes for #2053.Stephen Blott
Tweaks, plus... Reinstate deletion of two cache entries on tab close.
2016-03-17Use Chrome frameIds.Stephen Blott
2016-03-17Use ports to track frames.Stephen Blott
Use `onConnect()`, the `domReady` port and `onDisconnect()` to track the frames within a tab.
2016-03-17Move alphabet hint tests...Stephen Blott
... they were in the wrong place (and were being run twice).
2016-03-17Fix long-standing bug in link-hints tests.Stephen Blott
This code has been written to test both hints modes, however we were actually only testing one of them!
2016-03-16Relocate first scrollable element.Stephen Blott
When the scrollers `activatedElement` isn't scrollable, we currently search up the DOM tree for the next scrollable thing, and stop at `document.body`. However, it can be that that isn't scrollable. When that happens, this commit searches for a scrollable element in the same way as it does when the frame initially loads. This makes it possible to restart scrolling on pages like this one: - http://redux.js.org/docs/basics/UsageWithReact.html after clicking one of index links. Inspired by example posted by @marlun in #425.
2016-03-13Tweak options page class names...Stephen Blott
We were using the class name exclusionRemoveButton for the `td` containing the button to remove exclusion rules on the options page. Because of this, we were (correctly) picking up the button itself as clickable, but incorrectly picking up also its enclosing `td` (which isn't actually clickable at all). The effect was to always have two hint labels over the remove button. This was happening simply because we have the text "button" in the class name. So, here, we just rename the classes.
2016-03-13Merge pull request #2050 from smblott-github/add-testsStephen Blott
Add tests in various areas...
2016-03-13Add tests in various areas...Stephen Blott
- key handling - filtered hints - scoring - filtered hints - tab - link hints - changing mode Also, correct the argument ordering in several assert.equal() calls.
2016-03-10Tests; add alphabet-hint hint tests.Stephen Blott
This adds tests for a couple of properties that are required of alphabet hint strings.
2016-03-09Fix mainFrame command...Stephen Blott
Oversight from #2022.
2016-03-08Merge pull request #2043 from smblott-github/fix-2038Stephen Blott
Fix focus issue with UI components (#2038)
2016-03-06Tweak new features in README.Stephen Blott
2016-03-06Note new features in README...Stephen Blott
- map abc insertMode - no longer spam dev console
2016-03-06Fix focus issue with UI components.Stephen Blott
Problem: - `?`, `o`, `Esc`, `Esc` leaves the focus in the (invisible) help dialog frame, rendering Vimium broken. Since we do @iframeElement.focus() when we activate a UI component, here we do @iframeElement.blur() when hiding such elements. Fixes #2038.
2016-03-06Merge pull request #2033 from ↵Stephen Blott
smblott-github/init-ui-components-only-when-enabled Do not initialise UI components when disabled.
2016-03-06Tweak documentReady().Stephen Blott
We can remove these listeners once we're done.
2016-03-06Don't HUD.init() until DOM is ready.Stephen Blott
2016-03-06Do no init Vomnibar pre-DomReady (tweak).Stephen Blott
2016-03-06Do no init Vomnibar pre-DomReady.Stephen Blott
2016-03-06Address possible race condition in Vomnibar initialization.Stephen Blott
This addresses the potential race condition mentioned in this commit record (3542db7b6c322d803c263db641ae0b02327447ca) and in #2033. In non-top frames, wait until documentReady before sending the message to initialise the Vomnibar. This cannot be before preDomReady in the main frame, right?
2016-03-06Initialize UI components only when they're needed.Stephen Blott
HUD: Initialize only when the frame receives the focus and Vimium is enabled. Vomnibar: Initialize in the top frame when Vimium is enabled in *any* frame. Warning: There may be a race condition here. Specifically, if Vimium is disabled in the main/top frame (T) but enabled in another frame (A), then the initialisation could happen in frame A before frame T is listening, so frame T would miss the initialization message (which is only sent once). Message listeners are installed early (and probably installed first in the main/top frame), and the `isEnabledForUrl` messaging takes some time, so perhaps it's OK. But it *is* a race condition. Fixes #1838.
2016-03-06Make HUD.init() idempotent.Stephen Blott
2016-03-06Fix count handling (again).Stephen Blott
`7gj` should be `1j`. Also, with: map ab SOMETHING `7aab` should be `1ab`. Replacement for 7774beb6643c0d905f9caba4345453790af948ad.
2016-03-06Revert "Count prefix applies only to leading mapping."Stephen Blott
This reverts commit 7774beb6643c0d905f9caba4345453790af948ad. Reverting this. It can be done better (and capture some other incorrect cases).
2016-03-06Normal mode tests.Stephen Blott
With #2022, we can now implement normal-mode key-handling tests. Writing these tests uncovered the bug behind 7774beb6643c0d905f9caba4345453790af948ad.
2016-03-06Count prefix applies only to leading mapping.Stephen Blott
E.g. `7gj` should be `1j`; currently it's `7j`.
2016-03-06Merge pull request #2040 from smblott-github/resize-iconsStephen Blott
Resize page icons to 128x128.
2016-03-06Resize page icons to 128x128.Stephen Blott
Fixes #2035.
2016-03-06Copy 300x300 versions of icons.Stephen Blott
Keep 300x300 copies of the page icons, preparatory to resizing them to fix #2035.
2016-03-05Move LinkHint mode indicator text into modesmrmr1993
2016-03-05Tweak #2036.Stephen Blott
2016-03-05Use clickModifiers in link hint modes for modifiers for click activationmrmr1993
2016-03-05Move non-click link hint activators to the corresponding mode objectsmrmr1993
2016-03-05Factor out click activators in link hintsmrmr1993
2016-03-05Reformat link hint mode objects for easier diffsmrmr1993
This is a no-op.
2016-03-05Generalise topFrame commands.Stephen Blott
This generalises the mechanism by which commands are always run in the tab's main/top frame. Currently, that's just the Vomnibar. This is a precursor to moving other UI components to the main/top frame. It should be fairly trivial to move the help page to the main frame. The HUD might be trickier. Mention: @mrmr1993.