aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts
AgeCommit message (Collapse)Author
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.
2016-02-20Add `count` command option.Stephen Blott
Examples: map j scrollDown count=10 map q removeTab count=999
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-18PassNextKey; exclude single-character mappings.Stephen Blott
Consider: map q passNextKey This works fine in normal mode. However, in insert mode, when the user types "q" they expect "q" to be input. Any other behaviour would be pretty weird. Here, we filter out such mappings before the front end sees them. So, with: map q passNextKey map <c-]> passNextKey both mappings work in normal mode, but only the second works in insert mode. This is probably the behaviour likely to cause least user confusion.
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; store key mapping in settings.Stephen Blott
We need the key mapped to passNextKey in the front end so that we can activate pass-next-key from within insert mode too (without the need to consult the background page).
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-12Nuke some legacy migration code.Stephen Blott
These migrations are at least ten months old (since release).
2016-02-10BgUtils; two fixes...Stephen Blott
- handle case where there's only one tab - also focus the selected tab's window
2016-02-09BgUtils; implement visitPreviousTab.Stephen Blott
Implements visitPreviousTab (as discussed in #1955).
2016-02-09BgUtils; move tabRecency to bg_tiles.coffee.Stephen Blott
Certain background-page utilities are actually shared, and are therefore best placed in place that reflects that. Here, tabRecency is moved to the new gb_utils.coffee in preparation for implementing a go-to-previous-tab command. In particular, it is no longer appropriate that tabRecency be embedded within the completion code. logMessage() from main.coffee is also a candidate for moving to bg_utils.coffee.
2016-02-03Update only help dialog contents when showingmrmr1993
2016-02-03Use <span>s as placeholders in help_dialog.htmlmrmr1993
2016-02-03Store help dialog injected strings together, inject all at oncemrmr1993
2016-01-31Use a count with link hints.Stephen Blott
Pass a count to link-hint commands, and the link-hint mode is started that many times (except "with queue"). This resolves the same issue as #1291. However, this: - does not require re-basing (which is no biggie), and - keeps all of the count-handling logic (apart from plumbing) in one place, in `LinkHints.activateMode()`. The link-hints mode itself does not know anything about count handling. Serious bug: - Using `Escape` to exit does not cancel the repeat! Fixes #1289. Closes #1291.
2016-01-31Merge branch 'goToLine'Stephen Blott
2016-01-31Merge pull request #1958 from smblott-github/logging-pageStephen Blott
Add a logging page...
2016-01-31Wholly remove edit-mode code.Stephen Blott
I am now of the opinion that we should not do this within Vimium, as: - better solutions exist externally, and - it's better to not have to maintain this.
2016-01-31Add a basic log page; tweaks.Stephen Blott
This tweaks @mrmr1993's logging ideas discussed in #1629: - Do not generate log entries from the logging page itself. - Use the logger for *all* logging (including from `commands.coffee`, and from `bgLog`). @mrmr1993's original idea is 91fb337c9d92f6291ef42c55c4d29ca35b710203.
2016-01-30Add a basic log pagemrmr1993
2016-01-30Add number modifier to `gg' scrollToTop commandmrmr1993
2016-01-29Revert "Enable edit mode."Stephen Blott
This reverts commit e975633f3ee8da9e01c332b2dcdb8422d5f941d8.
2016-01-26Enable edit mode.Stephen Blott
This re-enables edit-mode (`gv`). The code for this has been present in `master` for quite some time, but has been disabled.
2016-01-26Remove "beta" label from visual-mode commands.Stephen Blott
These seem to be working fine, we can commit to them.
2015-11-20Fix indentation so that `openerTabId` takes effectGábor Luk
2015-09-20Merge pull request #1086 from mrmr1993/countMatchesPhil Crosby
Rework to make match counting code for searches more DRY and easier to read