]> git.gir.st - VimFx.git/log
VimFx.git
8 years agoInclude LICENSE in the build
Simon Lydell [Sun, 21 Jun 2015 09:25:52 +0000 (11:25 +0200)]
Include LICENSE in the build

8 years agoDocument options
Simon Lydell [Sun, 21 Jun 2015 03:25:48 +0000 (05:25 +0200)]
Document options

8 years agoDocument public API
Simon Lydell [Sun, 21 Jun 2015 01:18:18 +0000 (03:18 +0200)]
Document public API

8 years agoDocument options
Simon Lydell [Sat, 20 Jun 2015 21:57:45 +0000 (23:57 +0200)]
Document options

8 years agoDocument how to style VimFx elements
Simon Lydell [Sat, 20 Jun 2015 20:22:00 +0000 (22:22 +0200)]
Document how to style VimFx elements

See #233, #424, #465.

8 years agoClarify licenses
Simon Lydell [Sat, 20 Jun 2015 19:31:40 +0000 (21:31 +0200)]
Clarify licenses

8 years agoInit documentation
Simon Lydell [Sat, 20 Jun 2015 19:31:14 +0000 (21:31 +0200)]
Init documentation

8 years agoName all translation IDs consistently
Simon Lydell [Sat, 20 Jun 2015 17:25:54 +0000 (19:25 +0200)]
Name all translation IDs consistently

8 years agoMajor refactor: Rework all UI and related improvements
Simon Lydell [Thu, 4 Jun 2015 20:22:17 +0000 (22:22 +0200)]
Major refactor: Rework all UI and related improvements

This commit is unfortunately very large. I do not like that, but most of the
things in this commit are very closely related, which made it easier to do it
this way.

Help dialog
===========

- It is no longer used to customize shortcuts. That's done in VimFx's settings
  in the Add-ons Manager instead.

- Moved "enjoying/found bug" from the Help dialog and into the readme. The
  readme will be used as the extension description on AMO. That description is
  also shown in the Add-ons Manager, so users will see it when customizing
  VimFx.

- It is no longer injected inside web pages, but in the Firefox chrome. This
  allows to get rid of the nasty resets in the CSS and makes it impossible for
  page elements to cover it. #477

- It now fills the entire page and adjusts based on your screen size. It is
  designed to work with lots of shortcut customization and the additon of new
  modes by other extensions.

- Added `gulp help.html` to make it easier to style the help dialog.

Settings UI
===========

- Shortcuts customization is now done in VimFx's settings page in the Add-ons
  Manager. This keeps all settings together and makes it obvious that you can
  customize the shortcuts. The new UI is also more accessible.

- The new UI also lets you:

  - Insert the default value of a pref. This is useful for the "prev/next
    patterns" by letting you merge in new defaults into your own customizations.
  - Reset to the default value. #262
  - Insert the next keypress as text. The default shortcut for this is `<c-q>`.
    (q as in quote. vim also has this shortcut, which works like its `<c-v>`.)
    For example, if the user is unsure how to express `<c-enter>` (s)he could
    simply press `<c-q><c-enter>` and `<c-enter>` would be inserted as text.

Button
======

- Now has high-resolution images. #383

- Is now implemented using CustomizableUI. #303 #349

- Greatly simplified:

  - If in normal mode, clicking it opens the help dialog.
  - Otherwise it exits the current mode returning to normal mode. This is
    useful if the user accidentally removes the keyboard shortcuts to exit
    modes, or don't know how to exit insert mode, for example.

  The above means that the "disable" feature has been removed. The UI to
  "blacklist" sites has been removed as well. See the "Removed/Changed/Addesd
  features" section for more info.

- It is now easily stylable with user CSS.

- State is no longer lost when moving a tab into a new window. #57

Removed/Changed/Added features
==============================

- The "disable" feature has been completely removed. It is rather useless
  compared to insert mode, and sometimes trips new users up. #327

- The "blacklist" feature has been changed into an "auto-insert-mode" feature.
  It is basically the same, except that you can actually choose to leave the
  blacklisted state for a while if you feel like it. The default shortcut to
  leave insert (`<s-escape>`) is not likely to conflict with page shortcuts.
  It is possible to disable the exit shortcut on certain pages using the public
  API.

- The "blacklist" feature has been de-emphasized. The button no longer offers
  any UI to blacklist and un-blacklist sites (see above). VimFx is supposed to
  be keyboard driven, so having a mouse-oriented UI makes no sense. Blacklisting
  is also a bit of an anti-feature, so we shouldn't maintain lots of UI code for
  it. It's simple enough to just open the Add-ons Manager and add
  `*currentdomain.com*` to the blacklist setting.

- The "blacklist" no longer supports the `!` wild card (that matched a single
  character) to keep things simple. The less to explain to the user the better.
  If users need more advanced wildcards than the simple `*` they can use the
  public API (see the Public API section) which allows to use all of
  JavaScript's power.

- The "blacklist" no longer supports the `##key1#key2` syntax to disable certain
  keys on certain sites. Instead a superior public API function is offered. This
  feature only existed in the develop branch for a while and was never released.
  Any users of it must manually move to the public API.

- The "prev/next patterns" no longer support the `*` and `!` wildcards. Instead
  they are treated as regexes (which allows to use `.*` and `.` instead). This
  is way simpler, and more powerful. Non-technical users can just keep adding
  simple patterns such as "next" translated into their language without being
  troubled by regex syntax, while advanced users can use the full power of regex
  if needed. The public API may of course also be used for unlimited power.

- The "blacklist" and "prev/next patterns" are no longer comma/space-separated.
  To keep things simple their just space-separated. Space is not a valid URL
  character, but a comma is, so this allows to match a URL which ends with a
  comma (but that is probably too rare to ever be useful). More importantly it
  makes the settings easier to read. Space could be part of a "prev/next
  pattern", though. Thanks to the above point one may use `\s` instead, which is
  also more robust. The prefs are automatically migrated to the new format.

- The "translations" pref in about:config is no longer used. Instead you have to
  use the public API. This is because it is an advanced feature and next to
  impossible to manage as a single line of JSON. This also keeps the code
  simpler. The pref only existed in the develop branch for a while and was never
  released. Any users of it must manually move to the public API.

- Most hard-coded constants have been moved into prefs, which can only be
  changed via about:config or the public API. For advanced users only. For
  example:

  - "prev/next patterns" attributes. #489
  - "target blank prevention". #452

- Pressing `aj` used to trigger the `j` shortcut, but doesn't any longer. Since
  there is no `aj` shortcut (by default) nothing happens. The reason that
  "feature" used to exist was because there used to be no concept of a timeout.
  For example if you pressed `a`, went from the computer for a while, came back
  and pressed `/` the `a/` shortcut would be invoked, which is a bit surprising.
  Now there is a timeout instead, which defaults to 2 seconds. So if you type
  `aj` with less than 2 seconds between the key presses, nothing will happen.
  Otherwise the `a` partial match will be cancelled and the `j` command will be
  invoked. This is more like vim works.

- The escape command used to be special-cased so that you could trigger it
  inside text boxes. Now this is done through the concept of "force keys"
  instead. If you add `<force>` at the beginning of a shortcut it will be
  available in text boxes as well. #194

Refactoring
===========

- All modes are know implemented the same way. Normal mode used to be
  special-cased and all other modes were rather limited.

- Commands and modes are now a lot more DRY.

- defaults.coffee now takes care of command categorization and ordering. It is
  essentially the text version of the help dialog. Changing order and/or
  categories there automatically affects the help dialog (and the settings UI)
  as well.

- The command matching algorithm is now much more simple and flexible.

- Because the help dialog was moved into browser chrome, there is no longer any
  need to insert the style sheet as an `AGENT_SHEET`, which made it difficult to
  override it with user CSS, for example to change the font size or color of
  hint markers. #465 #424 #233 #220

Public API
==========

Added a public API. This will be used by advanced users and by other extensions
that wish to extend VimFx. It allows to:

- Keep all VimFx configuration in a text file (instead of configuring it via
  VimFx’s GUI and storing it in Firefox’s prefs system). #245
- Add your own custom commands. #508 #490 #235
- Add site-specific options.
- Disable specific keys on some sites. #255
- Do things when entering pages, such as automatically entering insert mode
  (this can be used instead of the "blacklist" feature) or hints mode. #408
- Set some advanced settings that cannot be set any other way.
- Add new command categories.
- Add new modes.

8 years agoImprove error reporting in test runner
Simon Lydell [Sat, 20 Jun 2015 12:36:56 +0000 (14:36 +0200)]
Improve error reporting in test runner

8 years agoIntroduce a `VimFx` instance to hold global state
Simon Lydell [Sun, 24 May 2015 17:18:59 +0000 (19:18 +0200)]
Introduce a `VimFx` instance to hold global state

8 years agoImprove command order and categories
Simon Lydell [Sun, 24 May 2015 15:16:46 +0000 (17:16 +0200)]
Improve command order and categories

8 years agoRework custom shortcut prefs
Simon Lydell [Sun, 24 May 2015 14:07:33 +0000 (16:07 +0200)]
Rework custom shortcut prefs

- Defaults are now set for all prefs (including custom shortcuts and advanced
  options), not just the options that can be seen in the options UI.
- All command prefs are now named 'mode.<mode>.<command>'. So are the
  translation IDs for the commands. This helps to simplify the code.
- Migration from the 0.5.x format and the format used in the devlopment version
  up until this commit can now be done once, instead of at every startup and
  every shortcut change.
- All old custom shortcut prefs are migrated automatically, using a generalized
  migration facility that can be reused for other migrations in the future.
- Some command names were slightly renamed to improve consistency and to make
  the more descriptive. The latter is important since regular users are now
  expected to be able to read lib/defaults.coffee as documentation on all
  default shortcuts.

8 years agoSimplify compatible Firefox version management
Simon Lydell [Mon, 15 Jun 2015 19:29:26 +0000 (21:29 +0200)]
Simplify compatible Firefox version management

The only thing that matters is the minimum version, and it is only the major
number of it that matters.

Including a maximum version number is pretty pointless since most of the time
we've just set it to some version in the future without actually knowing if
VimFx works with that version or not. Firefox's release cycle is also so fast
that it is very hard to keep up with it. Finally, AMO automatically bumps the
maximum version if the addon passes their tests. So it is better to simply set
it to `*` and be done with it.

8 years agoFix error in install.rdf.tmpl
Simon Lydell [Mon, 15 Jun 2015 19:26:45 +0000 (21:26 +0200)]
Fix error in install.rdf.tmpl

8 years agoMerge pull request #498 from mozillazg/zh-CN
Simon Lydell [Wed, 3 Jun 2015 06:05:54 +0000 (08:05 +0200)]
Merge pull request #498 from mozillazg/zh-CN

Update zh-CN translation

8 years agoUpdate zh-CN translation
huangzg [Wed, 3 Jun 2015 02:14:06 +0000 (10:14 +0800)]
Update zh-CN translation

8 years agoAdd `gulp readme`
Simon Lydell [Sun, 24 May 2015 10:49:18 +0000 (12:49 +0200)]
Add `gulp readme`

8 years agoOnly inject options UI in our own addon
Simon Lydell [Sun, 24 May 2015 09:39:34 +0000 (11:39 +0200)]
Only inject options UI in our own addon

8 years agoImprove node_modules glob
Simon Lydell [Sun, 24 May 2015 09:37:09 +0000 (11:37 +0200)]
Improve node_modules glob

8 years agoMerge branch 'prefs' into develop
Simon Lydell [Sat, 23 May 2015 21:48:17 +0000 (23:48 +0200)]
Merge branch 'prefs' into develop

8 years agoSimplify `gulp sync-locales`: only support .properties
Simon Lydell [Sat, 23 May 2015 21:39:17 +0000 (23:39 +0200)]
Simplify `gulp sync-locales`: only support .properties

If we ever re-add .dtd files we can revert this commit.

8 years agoRewrite the README key features / shortcuts parts
Simon Lydell [Sat, 23 May 2015 21:17:44 +0000 (23:17 +0200)]
Rewrite the README key features / shortcuts parts

This commit merges those parts into one. The complete list of shortcuts has been
removed. As it will only grow, it gets a little overwhelming. It is also a PITA
to maintain. Instead, only some of the most important default shortcuts are
mentioned, more like on the current AMO page, and there's a link to
lib/defaults.coffee in case somebody wants to easily view all defaults before
installing the add-on.

The above makes the readme suitable as the text used on AMO. Therefore I also
updated a few links to make them work on AMO as well.

8 years agoRefactor defaults
Simon Lydell [Sat, 23 May 2015 21:11:13 +0000 (23:11 +0200)]
Refactor defaults

- Define all defaults in lib/defaults.coffee, instead of some in
  defaults/preferences/defaults.js, some in lib/commands.coffee and some in
  lib/modes.coffee.
- Fix saving of non-ascii strings.
- Remove the autofocus limit option from the UI.
- Make the options UI in the Add-ons Manager DRY.

8 years agoFix lint errors
Simon Lydell [Sat, 23 May 2015 14:17:20 +0000 (16:17 +0200)]
Fix lint errors

8 years agoSimplify paste_tab command
Simon Lydell [Sat, 23 May 2015 12:10:30 +0000 (14:10 +0200)]
Simplify paste_tab command

8 years agoFix broken paste command
Simon Lydell [Sat, 23 May 2015 12:07:16 +0000 (14:07 +0200)]
Fix broken paste command

9 years agoProperly end `gulp release`
Simon Lydell [Thu, 21 May 2015 18:05:18 +0000 (20:05 +0200)]
Properly end `gulp release`

9 years agoAdd `gulp changelog`
Simon Lydell [Thu, 21 May 2015 18:02:43 +0000 (20:02 +0200)]
Add `gulp changelog`

9 years agoAdd new options to coffeelint.json
Simon Lydell [Mon, 18 May 2015 15:16:44 +0000 (17:16 +0200)]
Add new options to coffeelint.json

9 years ago2-space indentation in coffeelint.json
Simon Lydell [Mon, 18 May 2015 15:06:47 +0000 (17:06 +0200)]
2-space indentation in coffeelint.json

9 years agoUse a SPDX-compliant license identifier
Simon Lydell [Mon, 18 May 2015 15:05:54 +0000 (17:05 +0200)]
Use a SPDX-compliant license identifier

9 years agoFix lint errors
Simon Lydell [Mon, 18 May 2015 15:04:32 +0000 (17:04 +0200)]
Fix lint errors

9 years agoFix error in coffeelint.json
Simon Lydell [Mon, 18 May 2015 15:03:02 +0000 (17:03 +0200)]
Fix error in coffeelint.json

9 years agoUpdate dependencies
Simon Lydell [Mon, 18 May 2015 15:02:26 +0000 (17:02 +0200)]
Update dependencies

9 years agoUpdate translators
Simon Lydell [Mon, 18 May 2015 11:28:01 +0000 (13:28 +0200)]
Update translators

9 years agoMerge pull request #492 from mymedia2/russian2
Simon Lydell [Mon, 18 May 2015 11:19:10 +0000 (13:19 +0200)]
Merge pull request #492 from mymedia2/russian2

Updated russian translation

9 years agoUpdated russian translation
Guriev Nicholas [Sun, 17 May 2015 21:10:31 +0000 (00:10 +0300)]
Updated russian translation

9 years agoRemove stray console.log
Simon Lydell [Thu, 14 May 2015 22:38:38 +0000 (00:38 +0200)]
Remove stray console.log

9 years agoRemove the 'enable KeyboardEvent.code' option
Simon Lydell [Thu, 14 May 2015 22:25:16 +0000 (00:25 +0200)]
Remove the 'enable KeyboardEvent.code' option

It is enabled by default in Firefox 38, which has been released now.

As a consequence, this commit also bumps the minimum Firefox version to 38.

9 years agoMerge pull request #461 from lydell/scroll
Simon Lydell [Thu, 14 May 2015 22:20:11 +0000 (00:20 +0200)]
Merge pull request #461 from lydell/scroll

Make scrolling commands scroll the focused element

9 years agoAdd commands to scroll to the far left/right
Simon Lydell [Mon, 9 Feb 2015 16:57:57 +0000 (17:57 +0100)]
Add commands to scroll to the far left/right

9 years agoMake scrolling commands scroll the focused element
Simon Lydell [Fri, 30 Jan 2015 21:17:45 +0000 (22:17 +0100)]
Make scrolling commands scroll the focused element

Fixes #11. If the currently focused element is scrollable, it is scrolled by the
scrolling commands. Otherwise the whole document is scrolled.

In other words, you may now choose which element to scroll with the 'f' or 'vf'
command, and then you can scroll it with the scroll commands.

Fixes #399. Using counts with scrolling commands now works reliably.

The scrolling commands respect built-in Firefox prefs:

- general.smoothScroll: Turn smooth scrolling on/off for _all_ scrolling
  commands.
- general.smoothScroll.lines: h, j, k, l only.
- general.smoothScroll.pages: d, u, <space>, <s-space> only.
- general.smoothScroll.other: gg, G only.
- toolkit.scrollbox.horizontalScrollDistance: Scroll step for h, l.
- toolkit.scrollbox.verticalScrollDistance: Scroll step for j, k.

The two last prefs replace the scroll step setting.

A bunch of new (hidden) prefs let you customize the smooth scrolling, in the
same spirit as the built-in `general.smoothScroll.<type>.duration{Min,Max}MS`.
They're called `smoothScroll.<type>.spring-constant` and work like
`layout.css.scroll-behavior.spring-constant`.

This commit also bumps the minimum Firefox version to 36, since
`Element.prototype.scroll{To,By}` are used and first available in that version.

9 years agoUpdate readme
Simon Lydell [Thu, 14 May 2015 18:13:47 +0000 (20:13 +0200)]
Update readme

9 years agoSplit CONTRIBUTING.md into two files and improve them
Simon Lydell [Thu, 14 May 2015 17:57:48 +0000 (19:57 +0200)]
Split CONTRIBUTING.md into two files and improve them

CONTRIBUTING.md now only contains issue reporting instructions, to make it look
less overwhelming.

CONTRIBUTING-CODE.md contains the rest. Added information about the current
state of development, about the upcoming 0.6.0 release and the future rapid
release cycle plans.

9 years agoRemove 0.6.0 upgrade notice
Simon Lydell [Thu, 14 May 2015 17:37:01 +0000 (19:37 +0200)]
Remove 0.6.0 upgrade notice

Because the develop branch is now the default. Let's re-add it when 0.6.0 is
actually released.

9 years agoImprove placement of hint markers when zoomed
Simon Lydell [Thu, 14 May 2015 11:58:32 +0000 (13:58 +0200)]
Improve placement of hint markers when zoomed

Every other zoom level they seem to be a tiny bit off, but this is definitely
much better than it was before.

9 years agoAdd `gulp faster`
Simon Lydell [Wed, 13 May 2015 14:53:57 +0000 (16:53 +0200)]
Add `gulp faster`

9 years agoMerge pull request #487 from lindhe/develop
Simon Lydell [Fri, 1 May 2015 11:40:10 +0000 (13:40 +0200)]
Merge pull request #487 from lindhe/develop

Fixed a small but vital typo

9 years agoFixed a small but vital typo
Andreas Lindhé [Fri, 1 May 2015 11:31:43 +0000 (13:31 +0200)]
Fixed a small but vital typo

9 years agoAdd French translator to PEOPLE.md
Simon Lydell [Fri, 17 Apr 2015 18:10:04 +0000 (20:10 +0200)]
Add French translator to PEOPLE.md

9 years agoMerge pull request #482 from m-r-r/origin/french-translation
Simon Lydell [Fri, 17 Apr 2015 18:07:54 +0000 (20:07 +0200)]
Merge pull request #482 from m-r-r/origin/french-translation

Added a french translation (v2)

9 years agoAdded a french translation
m-r-r [Thu, 16 Apr 2015 20:20:18 +0000 (22:20 +0200)]
Added a french translation

9 years agoDo not treat `<a href="">` as links
Simon Lydell [Tue, 3 Mar 2015 18:51:49 +0000 (19:51 +0100)]
Do not treat `<a href="">` as links

Some sites use those as buttons. `element.href === window.location` in that
case. Otherwise several such "buttons" might get the same hint.

9 years agoMake it easier to run gulp without installing it globally
Simon Lydell [Sun, 22 Feb 2015 14:33:12 +0000 (15:33 +0100)]
Make it easier to run gulp without installing it globally

You may now type `npm run gulp --` instead of `gulp`. Thanks to @marlun for the
suggestion. Closes #467.

9 years agoMake it possible to distinguish count 1 from no count
Simon Lydell [Sun, 8 Feb 2015 20:00:39 +0000 (21:00 +0100)]
Make it possible to distinguish count 1 from no count

This way 'gi' can focus the last focused input, while '1gi' focuses the first
input no matter what.

9 years agoFix #47: 'gi' to focus last focused or first text input
Simon Lydell [Sun, 8 Feb 2015 19:42:16 +0000 (20:42 +0100)]
Fix #47: 'gi' to focus last focused or first text input

'gi' focuses the last focused or the first -- or the count:th to be precise --
text input of the page. Moreover, after you have focused something with 'gi',
<tab> and <s-tab> switch between only text inputs. That's convenient, because
'gi<tab><tab>' is then equivalent to '3gi'. Instead of trying 'gi' followed by
'<esc>2gi' followed by '<esc>3gi' etc. until you get to the input you want, you
can just type 'gi<tab><tab>' instead.

This required updating vim-like-key-notation to support <s-tab> more reliably.

9 years agoBetter vertically centered marker placement
Simon Lydell [Sun, 8 Feb 2015 16:34:17 +0000 (17:34 +0100)]
Better vertically centered marker placement

9 years agoMake sure `gulp release` tags the correct commit
Simon Lydell [Sun, 8 Feb 2015 12:56:33 +0000 (13:56 +0100)]
Make sure `gulp release` tags the correct commit

9 years agoUpdate dependencies
Simon Lydell [Sun, 8 Feb 2015 12:50:41 +0000 (13:50 +0100)]
Update dependencies

9 years agoReorder vimfx.properties to same order as in commands.coffee
Simon Lydell [Sun, 8 Feb 2015 12:27:20 +0000 (13:27 +0100)]
Reorder vimfx.properties to same order as in commands.coffee

9 years agoUpdate CONTRIBUTING.md
Simon Lydell [Sun, 8 Feb 2015 12:18:32 +0000 (13:18 +0100)]
Update CONTRIBUTING.md

9 years agoRun `gulp sync-locales`
Simon Lydell [Sun, 8 Feb 2015 12:13:38 +0000 (13:13 +0100)]
Run `gulp sync-locales`

9 years agoAdd `gulp sync-locales`
Simon Lydell [Sun, 8 Feb 2015 12:11:14 +0000 (13:11 +0100)]
Add `gulp sync-locales`

To make the implementation easier, all translations must be in a single line and
must not contain superfluos whitespace. All .dtd files were updated to reflect
this.

9 years agoDrastically improve speed up hints generation
Simon Lydell [Sat, 7 Feb 2015 22:06:15 +0000 (23:06 +0100)]
Drastically improve speed up hints generation

We used to apply a class to each element, to work around `border-radius`.
Removing that drastically speeds up hints generation. The "loss" is that the
markers no longer appear in the top-left corner, but rather in the left-middle.
That takes a little bit of getting used to, but is definitely worth it.

9 years agoReduce the number of hints on Google Calendar
Simon Lydell [Sat, 7 Feb 2015 21:27:51 +0000 (22:27 +0100)]
Reduce the number of hints on Google Calendar

As noted in https://github.com/akhodakivskiy/VimFx/pull/451#issuecomment-71582664,
Google Calendar gets too many hints. That's because many buttons are implemented
as `<div>`s with lots of `<div>`s inside, all of which have "button" in the
their class names. This commit exludes elements with "button" in the class name
if they contain yet such an element. This works fine on Google Calendar.
Hopefully it does not exlude too much on other pages.

9 years agoExclude test scripts from node_modules
Simon Lydell [Sat, 7 Feb 2015 21:12:05 +0000 (22:12 +0100)]
Exclude test scripts from node_modules

9 years agoMove `Command` into its own file
Simon Lydell [Tue, 3 Feb 2015 18:35:56 +0000 (19:35 +0100)]
Move `Command` into its own file

9 years agoRefactor `utils.getAllElements` into hints.coffee
Simon Lydell [Tue, 3 Feb 2015 18:21:39 +0000 (19:21 +0100)]
Refactor `utils.getAllElements` into hints.coffee

It no longer returned all elements as advertised, but instead returned an
optimized result for hints generation, so it belongs in hints.coffee.

9 years agoDrastically speed up hints generation
Simon Lydell [Fri, 30 Jan 2015 22:01:00 +0000 (23:01 +0100)]
Drastically speed up hints generation

By using a Firefox native function for getting all elements inside a given
rectangle. This is way faster than getting _all_ elements, and then manually
checking each element.

Fixes #409. Fixes #329.

9 years agoMerge branch 'develop' of github.com:akhodakivskiy/VimFx into develop
Simon Lydell [Thu, 29 Jan 2015 19:36:23 +0000 (20:36 +0100)]
Merge branch 'develop' of github.com:akhodakivskiy/VimFx into develop

9 years agoFix #459: Don't treat modified numbers as counts
Simon Lydell [Thu, 29 Jan 2015 19:33:39 +0000 (20:33 +0100)]
Fix #459: Don't treat modified numbers as counts

For example, if you press `<c-5>` or `<a-5>` to select the fifth tab, and then
press `J` to select the fourth, it used to be a risk that it was interpreted as
`5J`.

9 years agoMerge pull request #460 from TheGreenHabi/patch-1
Simon Lydell [Thu, 29 Jan 2015 19:28:11 +0000 (20:28 +0100)]
Merge pull request #460 from TheGreenHabi/patch-1

Fix comment typo in utils.coffee

9 years agoFix comment typo in utils.coffee
TheGreenHabi [Thu, 29 Jan 2015 18:37:42 +0000 (20:37 +0200)]
Fix comment typo in utils.coffee

mearues -> measures

9 years agoLet simulated clicks be cancelable
Simon Lydell [Wed, 28 Jan 2015 20:44:25 +0000 (21:44 +0100)]
Let simulated clicks be cancelable

They used to be, but it was lost in commit 1ee0208. This commit brings it back,
since `<a href="#">` is often used a JavaScript-powered button. If the event
cannot be canceled, clicking such a button will scroll to the top of the page.

(See also commit a4dfda53.)

9 years agoMerge branch 'TheGreenHabi-patch-1' into develop
Simon Lydell [Wed, 28 Jan 2015 15:40:59 +0000 (16:40 +0100)]
Merge branch 'TheGreenHabi-patch-1' into develop

9 years agoFix #440: Hint markers on feedly.com
TheGreenHabi [Tue, 27 Jan 2015 14:17:56 +0000 (16:17 +0200)]
Fix #440: Hint markers on feedly.com

9 years agoAdd icon design contributor
Simon Lydell [Tue, 27 Jan 2015 16:39:43 +0000 (17:39 +0100)]
Add icon design contributor

9 years agoMerge pull request #455 from lydell/youtube-space
Simon Lydell [Mon, 26 Jan 2015 21:19:42 +0000 (22:19 +0100)]
Merge pull request #455 from lydell/youtube-space

Youtube space

9 years agoUpdate vim-like-key-notation
Simon Lydell [Mon, 26 Jan 2015 19:26:58 +0000 (20:26 +0100)]
Update vim-like-key-notation

To support function keys (such as `<F1>`) for shortcuts.

9 years agoTreat the Youtube video player as an adjustable element
Simon Lydell [Mon, 26 Jan 2015 18:59:35 +0000 (19:59 +0100)]
Treat the Youtube video player as an adjustable element

- Pressing `<space>` on the entire player should play/pause.
- Pressing `<space>` on any of its controls should activate that control.
- The arrow keys should let you move the time slider.

Fixes #442.

9 years agoEnter automatic insert mode when an element is fullscreen
Simon Lydell [Mon, 26 Jan 2015 18:49:49 +0000 (19:49 +0100)]
Enter automatic insert mode when an element is fullscreen

Such as `<video>` tags being in fullscreen.

9 years agoMerge pull request #451 from lydell/hints
Simon Lydell [Mon, 26 Jan 2015 16:38:13 +0000 (17:38 +0100)]
Merge pull request #451 from lydell/hints

WIP: Hints improvements

9 years agoDo not consider links without href as proper links
Simon Lydell [Mon, 26 Jan 2015 16:29:51 +0000 (17:29 +0100)]
Do not consider links without href as proper links

Links ending with a `#` (`<a href="#">`) as well as `javascript:` links are
already excluded, because they're used as buttons, not links. Links without href
at all (`<a>`) should be excluded too, since they are also used as buttons (for
example, the voting buttons on stackoverflow.com). If they're not excluded, all
such links get the same hint, even though all of them do different things
through JavaScript. Moreover, the 'F' and 'gF' commands would try to open them
in new tabs, which of course wouldn't work.

9 years agoMake upgrade to 0.6.0 notice more visible
Simon Lydell [Mon, 26 Jan 2015 16:04:30 +0000 (17:04 +0100)]
Make upgrade to 0.6.0 notice more visible

9 years agoMerge branch 'master' into develop
Simon Lydell [Mon, 26 Jan 2015 16:03:52 +0000 (17:03 +0100)]
Merge branch 'master' into develop

Conflicts:
README.md

9 years agoAdd missing issue reporting instruction
Simon Lydell [Mon, 26 Jan 2015 16:01:14 +0000 (17:01 +0100)]
Add missing issue reporting instruction

9 years agoUpdate readme
Simon Lydell [Tue, 20 Jan 2015 20:44:12 +0000 (21:44 +0100)]
Update readme

9 years agoLet simulated clicks bubble
Simon Lydell [Sun, 25 Jan 2015 20:19:40 +0000 (21:19 +0100)]
Let simulated clicks bubble

They used to, but it was lost in commit 1ee0208. This commit brings it back,
since many buttons are wired up using event delegation, which requires bubbling.

9 years agoAdd Tree Style Tab support for opening new tabs
Simon Lydell [Sun, 25 Jan 2015 19:39:52 +0000 (20:39 +0100)]
Add Tree Style Tab support for opening new tabs

Since commit 05d60dba5 we no longer open links in new tabs by simulating
ctrl-clicks on them, but instead use Firefox APIs. Before, the new tabs were
detected by the Tree Style Tab extension and opened as new children of the
current tab. After that commit new tabs opened as new _siblings_ after the
current tab instead. This commit opens new tabs as children again, by using the
public [Tree Style Tab API][tst-api].

[tst-api]: http://piro.sakura.ne.jp/xul/_treestyletab.html.en#api.

9 years agoMake scrollable elements markable
Simon Lydell [Sun, 25 Jan 2015 19:02:01 +0000 (20:02 +0100)]
Make scrollable elements markable

This is the first step at fixing #11. You can now focus scrollable elements and
use the arrow keys to scroll it (which is how Firefox works by default). The
next step is to make VimFx's scrolling commands able to scroll them.

9 years agoProvide `vim.state`
Simon Lydell [Sun, 25 Jan 2015 18:09:49 +0000 (19:09 +0100)]
Provide `vim.state`

Instead of just assigning random properties on `vim` objects (such as
`.blacklisted` and `.lastInteraction`) we now assign them to `vim.state`. This
way we can properly initialize those values when new `vim` objects are made, and
easily reset all of them when the URL changes (which means that the state
changes).

9 years agoFix #60: Give the same hint to links with the same URL
Simon Lydell [Sun, 25 Jan 2015 17:23:35 +0000 (18:23 +0100)]
Fix #60: Give the same hint to links with the same URL

This results in fewer hints, which results in shorter hints overall.

'vf' is excluded so that everything still is focusable.

`<a href="#">` links, which are commonly used as buttons, are excluded since
clicking them likely does different things via JavaScript.

`<a href="javascript:">` links are also excluded, mainly because
`<a href="javascript:void(0)">` is a commonly used as buttons as well.

9 years agoAdd hint marker support for XUL documents
Simon Lydell [Sun, 25 Jan 2015 15:29:06 +0000 (16:29 +0100)]
Add hint marker support for XUL documents

For example, hint markers may now be used in the Add-ons Manager or in
about:newtab (fixes #51).

9 years agoMake sure hint markers cannot be line-wrapped
Simon Lydell [Sun, 25 Jan 2015 12:52:30 +0000 (13:52 +0100)]
Make sure hint markers cannot be line-wrapped

9 years agoImprove automatic insert mode
Simon Lydell [Sat, 24 Jan 2015 17:05:46 +0000 (18:05 +0100)]
Improve automatic insert mode

- You can now use `<enter>` as a shortcut and still be able to press `<enter>`
  on a focused link or button to activate it (without running the command).
- You can now run commands when for example a radio button is focused, but still
  move the selection with the arrow keys.

9 years agoMove `rotateOverlappingMarkers()` into marker.coffee
Simon Lydell [Sat, 24 Jan 2015 16:05:36 +0000 (17:05 +0100)]
Move `rotateOverlappingMarkers()` into marker.coffee

It has nothing to do with hints, but much to do with markers.

9 years agoImprove markable elements matching
Simon Lydell [Sat, 24 Jan 2015 15:41:38 +0000 (16:41 +0100)]
Improve markable elements matching

- Each 'f' command now gets its own set of markable elements. For example, it
  does not make sense to open a button in a new tab.
- The above made it really easy to fix #227: Add 'gf' to follow link in new
  foreground/focused tab.
- Links are now opened in new tabs using Firefox APIs instead of simulating
  ctrl-clicks on the links. This is more reliable (and required in order to
  implement the above point).
- XPath is no longer used. Instead, every element in every frame of the page is
  checked with code. This might sound expensive, but it isn't since that's what
  the XPath matcher needs to do behind the scenes anyway. The benefit of doing
  it with code is that we can do more advanced checks (see below), and no
  information is lost along the way: For example, whether or not an element is
  considered "semantic" is saved, instead of needing to be re-calculated
  afterwards.
- The above fixes #320 in a better way than what was already done in commit
  016574212: Elements that have "button" in their class now must not contain an
  `<a>` or `<button>` element, so a marker for a "button-wrapper" is likely not
  even made and therefore cannot cover the real button inside.
- The above also significantly reduced the number of hints on reddit.com, which
  made the all hints shorter.
- While at it, I implemented #450: 'vf' now selects the contents of text inputs.

9 years agoCorrectly determine viewport size
Simon Lydell [Sat, 24 Jan 2015 13:40:35 +0000 (14:40 +0100)]
Correctly determine viewport size

The old method was wrong and caused no hint to show up when viewing an image
directly to toggle zoom on it.

Moreover, if a page would have a very small height and a link absolutely
positioned below that height (but still inside the viewport) that link would not
get a hint either.

These two have been fixed.

9 years agoSimplify hint matching
Simon Lydell [Sat, 24 Jan 2015 00:20:38 +0000 (01:20 +0100)]
Simplify hint matching

Just like normal mode keeps track of the entered keys, hints mode now also keeps
track of the entered keys (chars), instead of letting each marker do it. The
markers now only keep track of themselves; how much they are matched.

Imprint / Impressum