aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts
AgeCommit message (Collapse)Author
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-09Fix mainFrame command...Stephen Blott
Oversight from #2022.
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.
2016-03-05Simplify command-registry generation.Stephen Blott
If we just use the name `background` instead of `isBackgroundCommand`, then we can simplify the building of registry entries. This is preparitory to adding a new registryEntry field: topFrame; initially just for the Vomnibar, but thereafter for other UI components.
2016-03-05Key bindings; document Commands.generateKeyStateMapping().Stephen Blott
2016-03-05Key bindings; and one more tiny tweak.Stephen Blott
2016-03-05Key bindings; move Vomnibar commands back to content scripts.Stephen Blott
2016-03-05Key bindings; small tweaks...Stephen Blott
- simplify pass key condition - don't keep key-parsing Regexp in memory - we should reset the key state when the pass keys change
2016-03-05Key bindings; tweaks.Stephen Blott
2016-03-05Key bindings; tweaks.Stephen Blott
2016-03-05Key bindings; and yet more minor tweaks.Stephen Blott
2016-03-05Key bindings; minor tweaks.Stephen Blott
2016-03-05Key bindings; reinstate keyToCommandRegistry.Stephen Blott
... We need it for the help page.
2016-03-05Key bindings; simplify Commands initialization.Stephen Blott
2016-03-05Key bindings; more tweaks and fixes.Stephen Blott
- There's no need to keep `@keyToCommandRegistry`; it's regenerated whenever it's needed.
2016-03-05Key bindings; handle overlapping bindingsStephen Blott
With: map g something map gg somethingElse The mapping for "g" always takes priority, regardless of the order in which they're encountered in `@keyToCommandRegistry`.
2016-03-05Key bindings; tweaks and fixes.Stephen Blott
2016-03-05Key bindings; rewire vomnibar (fix minor error).Stephen Blott
2016-03-05Key bindings; rewire vomnibar.Stephen Blott
2016-03-05Key bindings; more remove legacy code.Stephen Blott
2016-03-05Key bindings; remove legacy code.Stephen Blott
2016-03-05Key bindings; partially functioning w/ backgound commands.Stephen Blott
2016-03-05Key bindings; initial partially-functioning version.Stephen Blott
2016-02-28Fix defualt command "options".Stephen Blott
The default (for when no options are provided) is of the wrong type. This works as is, but should really be fixed -- as here.
2016-02-28Merge pull request #2025 from smblott-github/pass-count-to-scroll-functionsStephen Blott
Pass to count to scroll commands.
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-22Add install date to logging page.Stephen Blott
This implements a poor-man's build info. See #1352. Unfortunately, that requires a separate build target, and does not work with `cake autobuild`. This just records the *install date* and displays that info on the logging page. "Install date" because we can reliably determine it, and because it does answer the question *have I upgrade Vimium on this machine since last week?*. And on the logging page because that's out of the way, and not part of the regular Vimium interface.
2016-02-21Include count command option in repeat limit.Stephen Blott
We need to multiply by `count=N` *before* checking `repeatLimit`. Tweaks #2001.
2016-02-21Remove selectionChangedHandlers.Stephen Blott
With #2006 and #2009, this is no longer being used.
2016-02-21Merge pull request #2004 from smblott-github/remove-tabInfoMapStephen Blott
Remove (unused) `tabInfoMap`.
2016-02-21Merge branch 'rework-duplicateTab'Stephen Blott
Conflicts: background_scripts/commands.coffee
2016-02-21Merge pull request #2006 from smblott-github/fix-removeTabStephen Blott
Fix `<count>removeTab`.
2016-02-21Rework count command option initialisation.Stephen Blott
Previously: map J scrollDown count=NotANumber would break the command completely. Fixes an error introduced in #2001.
2016-02-20Rework the `duplicateTab` implementation...Stephen Blott
Specifically, avoid reliance on `chrome.tabs.onSelectionChanged`. If we merge this and #2006, then we can delete all of the `chrome.tabs.onSelectionChanged` code.
2016-02-20Merge branch 'windows-onFocusChanged'Stephen Blott
2016-02-20Tweak #2007.Stephen Blott
2016-02-20Fix bug in #2001.Stephen Blott
We were incorrectly setting `options.count` to `NaN` if there was no command option.
2016-02-21use chrome.windows.onFocusChanged to listen window switchinggdh1995
This fix the problem that `chrome.tabs.onActivated` won't be triggered when we switch Chrome windows.
2016-02-20Fix `<count>removeTab`.Stephen Blott
There's a nasty little bug in `removeTab` when you remove more tabs than there are in the window (and there is a second window): - all of the tabs in the currently-focused window are removed - then, later (so, time passes), when you change tab in the other window, we begin removing tabs again! The source of the bug is our reliance on `chrome.tabs.onSelectionChanged`, which doesn't first when removing the last tab in a window (and there is another window). Regardless, the previous semantics of `<count>removeTab` was questionable. It was preactically impossible to predict which tabs would removed. This picks the current tab, then those to the right of the current tab, then those to the left.
2016-02-20Remove unused variable.Stephen Blott
2016-02-20Remove (unused) `tabInfoMap`.Stephen Blott
It appears `tabInfoMap` (and related machinery) is not being used. This removes it.
2016-02-20Merge pull request #2003 from smblott-github/count-for-new-windowStephen Blott
Make `moveToNewWindow` accept a count.
2016-02-20Merge pull request #2001 from smblott-github/add-count-command-optionStephen Blott
Add count command option
2016-02-20Simplify command-option parsing.Stephen Blott
2016-02-20moveToNewWindow accepts a count.Stephen Blott
This make `moveToNewWindow` accept a count. For example, `3W` to move three tabs to (the same) new window. The tabs chosen are the current tab, then those to the right of the current tab, and then those to the left of the current tab. `999W` moves *all* tabs to a new window. It's not clear why you would want to do that. An alternative would be to leave the last tab behind.
2016-02-20Move wholly to chrome.sessions.Stephen Blott
This strips out the legacy pre-chrome.sessions code. The API has been in Chrome since version 37, and we probably don't really need to support older versions than that.