]> git.gir.st - VimFx.git/log
VimFx.git
8 years agoMerge branch 'master' into develop
Simon Lydell [Sun, 15 Nov 2015 19:48:04 +0000 (20:48 +0100)]
Merge branch 'master' into develop

Conflicts:
extension/lib/commands.coffee

8 years agoEnable the `braces_spacing` coffeelint rule
Simon Lydell [Sun, 15 Nov 2015 19:29:56 +0000 (20:29 +0100)]
Enable the `braces_spacing` coffeelint rule

The more lint rules enabled, the easier to collaborate.

Thank god for regex substitutions.

8 years agoIncrease the `max_line_length` rule to error
Simon Lydell [Sun, 15 Nov 2015 19:08:36 +0000 (20:08 +0100)]
Increase the `max_line_length` rule to error

8 years agoEnable the `missing_fat_arrow` coffeelint rule
Simon Lydell [Sun, 15 Nov 2015 19:06:57 +0000 (20:06 +0100)]
Enable the `missing_fat_arrow` coffeelint rule

To prevent mistakes like the one fixed in commit 5d2a01bf5.

8 years agoFix error in the 'underflow' event
Simon Lydell [Sun, 15 Nov 2015 19:02:39 +0000 (20:02 +0100)]
Fix error in the 'underflow' event

8 years agoSimplify `utils.removeDuplicates`
Simon Lydell [Sun, 15 Nov 2015 17:57:57 +0000 (18:57 +0100)]
Simplify `utils.removeDuplicates`

8 years agoMake `gi` find text inputs in all frames
Simon Lydell [Sun, 15 Nov 2015 17:55:26 +0000 (18:55 +0100)]
Make `gi` find text inputs in all frames

8 years agoFix nothing happening when clicking some buttons
Simon Lydell [Sun, 15 Nov 2015 01:50:51 +0000 (02:50 +0100)]
Fix nothing happening when clicking some buttons

... using `f`. This was broken by commit 7b69d5f6.

8 years agoFix missing hints for links with floated children
Simon Lydell [Sun, 15 Nov 2015 01:19:38 +0000 (02:19 +0100)]
Fix missing hints for links with floated children

Previously, we used `nsIDOMWindowUtils#nodesFromRect()` to get markable element
candidates, because of its speed. However, it turned out that that method does
not return elements with zero area, such as links with floated children. That
caused those links to not get a hint.

This commit switches back to `document.getElementsByTagName('*')`. Due to some
reordering of element filtering there seems to be no difference in performance!

Fixes #584.

8 years agoMake Facebook's comment fields focusable using `f`
Simon Lydell [Sun, 15 Nov 2015 00:18:21 +0000 (01:18 +0100)]
Make Facebook's comment fields focusable using `f`

Fixes #524.

8 years agoFix un-blurrable comment fields on Facebook
Simon Lydell [Sun, 15 Nov 2015 00:04:10 +0000 (01:04 +0100)]
Fix un-blurrable comment fields on Facebook

We used to only blur focusable elements (`.tabIndex > -1`) to "interfere with
the browser as little as possible." However, this made it impossible to blur
Facebook's comment fields. _Not_ being able to blur things is what interferes.

Fixes #604.

8 years agoImprove count and wrap semantics for tab select/move
Simon Lydell [Sat, 14 Nov 2015 23:18:10 +0000 (00:18 +0100)]
Improve count and wrap semantics for tab select/move

When using one of `J`, `K`, `gJ` and `gK` with a count, you usually don't want
to wrap around the tab bar, in case you counted too large a number. Then it's
less confusing what happened if it stops at the edge of the tab bar. This is how
it already works.

However, if you're at one of the ends of the tab bar and cannot move in the
chosen direction, there is no reason to forbid a count. Before this commit we
did, making the command a no-op. Now it is allowed. As an example, you can
select the second to last tab by pressing `2J` if you're currently on the first
tab.

The commands only wrap _once._ In other words, if you're on the first of five
tabs, pressing `6J` takes you back to the first tab (five moves), discarding the
last move instead of wrapping again to the last tab. This is useful if you count
too large a number.

See #578.

8 years agoHandle {,non-}pinned tabs separately in `gJ` and `gK`
Simon Lydell [Sat, 14 Nov 2015 22:42:22 +0000 (23:42 +0100)]
Handle {,non-}pinned tabs separately in `gJ` and `gK`

Previously, it was possible to move a non-pinned tab into the pinned tabs,
making it pinned, and to move a pinnned tab into the non-pinned tabs, making it
non-pinned.

Now, that's not the case anymore. The first non-pinned tab wraps to the last
tab, and the last tab wraps to the first non-pinned tab, and vice versa for
pinned tabs.

In other words, you can no longer use `gJ` and `gK` to change the pinned state
of a tab. Only `gp` can.

See #606.

8 years agoFix issues with scrolling and frames
Simon Lydell [Sat, 14 Nov 2015 20:28:34 +0000 (21:28 +0100)]
Fix issues with scrolling and frames

Since commit 4958beb3b we use `MutationObserver`s to keep
`vim.state.scrollableElements` up-to-date when scrollable elements are removed.
However, there are two more ways elements can be removed if the are located
inside a frame:

- If the whole frame is removed.
- If the `src` attribute of the frame is changed.

This caused "TypeError: can't access dead object" errors on gmail.com.

This commit takes care of those two frame cases as well.

See #605.

8 years agoRemove `utils.timeIt(fn)`
Simon Lydell [Sat, 14 Nov 2015 16:04:02 +0000 (17:04 +0100)]
Remove `utils.timeIt(fn)`

It required `fn` to be synchronous. Since the multi-process support, very little
is anymore, making it easier to add `console.time('foo')` and
`console.timeEnd('foo')` where needed.

8 years agoAdd count support to `g0`, `g^` and `g$` like Vimium
Simon Lydell [Sat, 14 Nov 2015 15:48:14 +0000 (16:48 +0100)]
Add count support to `g0`, `g^` and `g$` like Vimium

See #610.

8 years agoFix problem with counts and shortcut including `0`
Simon Lydell [Sat, 14 Nov 2015 15:49:05 +0000 (16:49 +0100)]
Fix problem with counts and shortcut including `0`

For instance, `5g0` didn't trigger the `g0` command. This was broken in commit
e552942c.

8 years agoFix lint errors
Simon Lydell [Sat, 14 Nov 2015 15:21:06 +0000 (16:21 +0100)]
Fix lint errors

8 years agoFix quirks after dragging tab to another window
Simon Lydell [Sat, 14 Nov 2015 15:05:57 +0000 (16:05 +0100)]
Fix quirks after dragging tab to another window

The quirks only happened in multi-process, where a new `vim` instance is not
instantiated for the dragged tab. We already update `.browser` and `.window`.
However, all frame script listeners were still using the message manager of the
old `<browser>`, making the `vim` instance miss out on its frame script
messages. For example, this caused the blacklist not to apply when reloading the
page in a tab dragged to another window. This commit adds the listeners for the
new `<browser>` as well.

8 years agoDon't lose state when loading tabs in the background
Simon Lydell [Sat, 14 Nov 2015 14:20:40 +0000 (15:20 +0100)]
Don't lose state when loading tabs in the background

'locationChange' used to be detected in a rather complicated fashion. While this
worked mostly it had problems with tabs loading in the background.
'locationChange' wouldn't fire until the a background tab was _selected,_
causing any state, such as scrollable elements, collected up to that point to be
lost. It also meant that the blacklist patterns were applied to late, which
could cause unwanted autofocus prevention, for example.

Using the 'readystatechange' inside frame scripts seems to do exactly what we
want. This commit switches to that technique, which also simplifies the code a
lot, removing many slightly hacky parts.

See #605.

8 years agoFix error in api.md
Simon Lydell [Sat, 14 Nov 2015 13:45:10 +0000 (14:45 +0100)]
Fix error in api.md

8 years agoStyle hints for scrollable elements differently
Simon Lydell [Sat, 14 Nov 2015 12:57:23 +0000 (13:57 +0100)]
Style hints for scrollable elements differently

Making it easier to understand which hints are for scrollable elements.

See #605.

8 years agoAllow to style markers based on the type of element
Simon Lydell [Sat, 14 Nov 2015 12:05:34 +0000 (13:05 +0100)]
Allow to style markers based on the type of element

... by adding `[data-type="scrollable"]` etc. to them.

See #605.

8 years agoKeep the largest scrollable element up-to-date
Simon Lydell [Sat, 14 Nov 2015 11:52:50 +0000 (12:52 +0100)]
Keep the largest scrollable element up-to-date

We used to not try to find a new largest scrollable element if the currently
largest scrollable element underflowed (stopped being scrollable), because it
was considered "unlikely". That might be true for "classic static" web pages,
but it is not for JavaScript-heavy sites, such as groups.google.com, which may
replace most of the DOM at any time. Therefore, we now _do_ try to find a new
largest scrollable element when the old stops being scrollable.

The above required changing the storage for the scrollable elements from a
`WeakSet` to a `Set`, in order to be able to enumerate the set. The reason
`WeakSet` was used before was to avoid memory leaks. However, that should not be
a problem, because we now remove elements removed from the DOM from the set,
because of the next paragraph. Also, all state is wiped when the page is left.

Unfortunately, the 'underflow' event is not fired for scrollable elements
removed from the DOM. Therefore that is tracked separately using
`MutationObserver`s.

See #605.

8 years agoChoose which element to scroll more wisely
Simon Lydell [Sat, 14 Nov 2015 10:40:38 +0000 (11:40 +0100)]
Choose which element to scroll more wisely

'overflow' events _are_ triggered for `<html>`, if it overflows. This means that
there is no need to try to detect if `<html>` is scrollable in `commands.scroll`
using `.scrollHeight` and `.clientHeight`; we can simply use
`vim.state.largestScrollableElement`.

The above is not only a code cleanup; it also fixes a bug, mentioned in #605:

On some sites (such as groups.google.com), `<html>` might overflow, but not be
scrollable because of `overflow: hidden;`. The old `.scrollHeight` vs.
`.clientHeight` technique did not catch this, and wrongly tried to scroll
`<html>` when there was a more appropriate scrollable element on the page.
`overflow: hidden;` _is_ taken care of for `vim.state.scrollableElements` and
`vim.state.largestScrollableElement`, though, fixing the problem.

This clears the confusion from commit 59cb2a9a:

> Revert "Remove unnecessary code in commands.follow{,_focus}"
>
> This reverts commit 1a77a5d62036ee0d6029b36ee3c2ef33355b0d85.
>
> Apparently, I must be wrong. I get a hint marker for the entire page (if it is
> scrollable) after this commit. So confused now.

As noted above, `<html>` (`document.documentElement`) _does_ get 'overflow'
events, and thus ends up in `vim.state.scrollableElements`, so we _should_
exclude `document.documentElement` from getting a marker. There is no need to
deal with quirks mode here, though. In quirks mode, `<body>` is considered the
root element and must be scrolled instead of `<html>`, but 'overflow' events are
still triggered for `<html>`, and _not_ for `<body>`.

8 years agoRevert "Remove unnecessary code in commands.follow{,_focus}"
Simon Lydell [Thu, 12 Nov 2015 21:46:22 +0000 (22:46 +0100)]
Revert "Remove unnecessary code in commands.follow{,_focus}"

This reverts commit 1a77a5d62036ee0d6029b36ee3c2ef33355b0d85.

Apparently, I must be wrong. I get a hint marker for the entire page (if it is
scrollable) after this commit. So confused now.

8 years agoDon't stay in "`gi` mode" if only one text input
Simon Lydell [Thu, 12 Nov 2015 19:00:23 +0000 (20:00 +0100)]
Don't stay in "`gi` mode" if only one text input

8 years agoDon't consider `<select>`s as text inputs for `gi`
Simon Lydell [Thu, 12 Nov 2015 19:00:23 +0000 (20:00 +0100)]
Don't consider `<select>`s as text inputs for `gi`

8 years agoRemove unnecessary code in commands.follow{,_focus}
Simon Lydell [Thu, 12 Nov 2015 17:21:23 +0000 (18:21 +0100)]
Remove unnecessary code in commands.follow{,_focus}

`document.documentElement` never emits an 'overflow' event even if it is
scrollable, and will thus never exist in `vim.state.scrollableElements`.

8 years agoFix prev/next patterns order not respected
Simon Lydell [Thu, 12 Nov 2015 07:10:54 +0000 (08:10 +0100)]
Fix prev/next patterns order not respected

Fixes #602.

8 years agoAdd missing word in options.md
Simon Lydell [Wed, 11 Nov 2015 19:57:00 +0000 (20:57 +0100)]
Add missing word in options.md

8 years agoUpdate scroll documentation
Simon Lydell [Wed, 11 Nov 2015 19:55:00 +0000 (20:55 +0100)]
Update scroll documentation

8 years agoPrepare for Tab Groups being removed from Firefox
Simon Lydell [Wed, 11 Nov 2015 17:36:23 +0000 (18:36 +0100)]
Prepare for Tab Groups being removed from Firefox

- Make sure that nothing crashes if `window.TabView` ceases to exist.
- Add TODO comments reminding to remove unnecessary when it is time.

<https://support.mozilla.org/kb/tab-groups-removal>

8 years agoVimFx v0.6.2 v0.6.2
Simon Lydell [Wed, 11 Nov 2015 16:50:45 +0000 (17:50 +0100)]
VimFx v0.6.2

8 years agoFix `P` compatibility with InstandFox
Simon Lydell [Wed, 11 Nov 2015 15:36:29 +0000 (16:36 +0100)]
Fix `P` compatibility with InstandFox

Fixes #595.

8 years agoFix commands not working on slowly-loading pages
Simon Lydell [Wed, 11 Nov 2015 11:48:33 +0000 (12:48 +0100)]
Fix commands not working on slowly-loading pages

This was broken in commit b50f5ea5.

See #588.

8 years agoConsistently use 2-space indentation in style.css
Simon Lydell [Wed, 11 Nov 2015 11:05:24 +0000 (12:05 +0100)]
Consistently use 2-space indentation in style.css

8 years agoDon't give the same hint to all `<a href="#?">`
Simon Lydell [Wed, 11 Nov 2015 10:46:31 +0000 (11:46 +0100)]
Don't give the same hint to all `<a href="#?">`

Fixes #596.

Many websites use `<a href="#">` instead of `<button>`. Apparently, some also
use `<a href="#?">`.

8 years agoFix toolbar button icon size in high dpi
Simon Lydell [Wed, 11 Nov 2015 09:56:37 +0000 (10:56 +0100)]
Fix toolbar button icon size in high dpi

Fixes #591.

8 years agoAdd an example to prev/next page patterns docs
Simon Lydell [Wed, 11 Nov 2015 08:54:58 +0000 (09:54 +0100)]
Add an example to prev/next page patterns docs

8 years agoEnhance scrolling when entire page isn't scrollable
Simon Lydell [Wed, 11 Nov 2015 07:23:09 +0000 (08:23 +0100)]
Enhance scrolling when entire page isn't scrollable

... by scrolling the largest scrollable element instead.

Fixes #585.

8 years agoFix hint markers placement when using Zoom text only
Simon Lydell [Wed, 11 Nov 2015 07:04:26 +0000 (08:04 +0100)]
Fix hint markers placement when using Zoom text only

Fixes #594.

8 years agoAllow to use numbers as shortcuts, overriding counts
Simon Lydell [Wed, 11 Nov 2015 06:51:49 +0000 (07:51 +0100)]
Allow to use numbers as shortcuts, overriding counts

... properly handling the special-case for `0`:

- `0J` is _not_ a count, because a count of zero makes no sense. It first
  invokes the `0` command, and then the `J` command.
- `20J` _is_ a count, repeating twenty times. In other words, pressing `2` and
  then `0` does _not_ run the `0` command (scroll to the far left) with a count
  of two. Instead, it sets the waiting count to twenty.

Fixes #587.

8 years agoImprove formatting of `<li>`s in `gulp {changelog,readme}`
Simon Lydell [Tue, 10 Nov 2015 19:37:46 +0000 (20:37 +0100)]
Improve formatting of `<li>`s in `gulp {changelog,readme}`

8 years agoDocument `gulp --silent`
Simon Lydell [Tue, 10 Nov 2015 19:26:09 +0000 (20:26 +0100)]
Document `gulp --silent`

8 years agoVimFx v0.6.1 v0.6.1
Simon Lydell [Tue, 10 Nov 2015 19:12:59 +0000 (20:12 +0100)]
VimFx v0.6.1

8 years agoFix `<tab>` behavior in browser UI
Simon Lydell [Tue, 10 Nov 2015 19:06:04 +0000 (20:06 +0100)]
Fix `<tab>` behavior in browser UI

Fixes #571. Also see #572, which suggested the method used in this commit.

8 years agoAdd migration to add `<force>` to `mode.normal.esc`
Simon Lydell [Tue, 10 Nov 2015 18:27:20 +0000 (19:27 +0100)]
Add migration to add `<force>` to `mode.normal.esc`

We already migrate old shortcut customizations to the new 0.6.0 format. However,
I forgot that if the user had customized the shortcut for the esc command, it
most likely needs `<force>` at the beginning as well.

This commit adds `<force>` to every shortcut for that command (if needed).
Ideally this should have been done already in the 0.6.0 release. Now we run the
tiny risk of adding `<force>` to a shortcut that the user actually intended not
to have `<force>` in, but it's worth it: See #577, #571, #582 and #583.

8 years agoAdd an advanced option to disable notifications
Simon Lydell [Tue, 10 Nov 2015 06:31:05 +0000 (07:31 +0100)]
Add an advanced option to disable notifications

Fixes #576.

8 years agoAdd a question to question-and-answers.md
Simon Lydell [Fri, 23 Oct 2015 14:28:38 +0000 (16:28 +0200)]
Add a question to question-and-answers.md

8 years agoReset `text-shadow` for the help dialog
Simon Lydell [Mon, 9 Nov 2015 22:23:41 +0000 (23:23 +0100)]
Reset `text-shadow` for the help dialog

The dialog may inherit it from light-weight themes, making it almost unreadable.

See also commit 238dc6c.

8 years agoReset `text-shadow` for hint markers
Simon Lydell [Mon, 9 Nov 2015 22:04:38 +0000 (23:04 +0100)]
Reset `text-shadow` for hint markers

They may inherit it from light-weight themes, making them almost unreadable.

Fixes #574.

8 years agoUse consistent casing for all pref titles in en-US
Simon Lydell [Mon, 9 Nov 2015 19:53:07 +0000 (20:53 +0100)]
Use consistent casing for all pref titles in en-US

See #571.

8 years agoMake `gulp readme` and `gulp changelg` AMO compatible
Simon Lydell [Mon, 9 Nov 2015 19:09:41 +0000 (20:09 +0100)]
Make `gulp readme` and `gulp changelg` AMO compatible

AMO only allows a small subset of HTML, and converts newlines to `<br>`. This
commit makes the mentioned commands output such text.

8 years agoVimFx v0.6.0 v0.6.0
Simon Lydell [Mon, 9 Nov 2015 18:15:12 +0000 (19:15 +0100)]
VimFx v0.6.0

8 years agoSilence AMO `Function` warnings
Simon Lydell [Mon, 9 Nov 2015 18:01:39 +0000 (19:01 +0100)]
Silence AMO `Function` warnings

The AMO validator thinks that if `Function` appears anywhere, it is a type of
`eval`. However, we use it to access `Function.prototype.call`. This commit
replaces the `Function` occurances with other methods in order to silence those
warnings.

8 years agoFix invalid Firefox maximum version
Simon Lydell [Mon, 9 Nov 2015 17:53:12 +0000 (18:53 +0100)]
Fix invalid Firefox maximum version

The version has to be one of those listed here:

https://addons.mozilla.org/en-US/firefox/pages/appversions/

Commit c1bc315c tried to simplify the compatible Firefox version management by
using `*` as the maximum version. However, that is not allowed when uploading to
AMO.

8 years agoFix invalid Firefox minimum version
Simon Lydell [Mon, 9 Nov 2015 17:43:39 +0000 (18:43 +0100)]
Fix invalid Firefox minimum version

The version has to be one of those listed here:

https://addons.mozilla.org/en-US/firefox/pages/appversions/

Apparently, `40` is invalid, while `40.0` is valid.

8 years agoFix error in `gulp release`
Simon Lydell [Mon, 9 Nov 2015 07:52:59 +0000 (08:52 +0100)]
Fix error in `gulp release`

One shouldn't _both_ return a stream (thanks to CoffeeScript's implicit returns)
_and_ call the callback.

8 years agoUpdate API stability note
Simon Lydell [Mon, 9 Nov 2015 07:27:33 +0000 (08:27 +0100)]
Update API stability note

8 years agoUpdate CONTRIBUTING-CODE.md
Simon Lydell [Mon, 9 Nov 2015 06:50:05 +0000 (07:50 +0100)]
Update CONTRIBUTING-CODE.md

Update information about master vs. develop and versioning.

8 years agoPoint links in readme to master rather than develop
Simon Lydell [Mon, 9 Nov 2015 06:40:49 +0000 (07:40 +0100)]
Point links in readme to master rather than develop

8 years agoTiny code cleanup
Simon Lydell [Mon, 9 Nov 2015 06:38:14 +0000 (07:38 +0100)]
Tiny code cleanup

8 years agoAdd missing `return`s after `for` loops
Simon Lydell [Mon, 9 Nov 2015 06:33:08 +0000 (07:33 +0100)]
Add missing `return`s after `for` loops

8 years agoFix mailing list link error in readme
Simon Lydell [Sat, 7 Nov 2015 18:22:03 +0000 (19:22 +0100)]
Fix mailing list link error in readme

8 years agoAdd changelog for 0.6.0
Simon Lydell [Thu, 5 Nov 2015 07:14:13 +0000 (08:14 +0100)]
Add changelog for 0.6.0

8 years agoTiny documentation fixes
Simon Lydell [Fri, 6 Nov 2015 06:34:45 +0000 (07:34 +0100)]
Tiny documentation fixes

8 years agoMerge pull request #570 from atilacamurca/locale-pt-br
Simon Lydell [Sat, 7 Nov 2015 17:47:07 +0000 (18:47 +0100)]
Merge pull request #570 from atilacamurca/locale-pt-br

Update locale messages of pt-BR.

8 years agoUpdate locale messages of pt-BR.
Átila Camurça [Sat, 7 Nov 2015 17:42:23 +0000 (14:42 -0300)]
Update locale messages of pt-BR.

8 years agoMerge pull request #567 from mymedia2/develop
Simon Lydell [Sat, 7 Nov 2015 10:31:08 +0000 (11:31 +0100)]
Merge pull request #567 from mymedia2/develop

Update russian locale

8 years agoUpdate russian locale
Guriev Nicholas [Sat, 7 Nov 2015 09:28:32 +0000 (12:28 +0300)]
Update russian locale

8 years agoFix scrolling in pages without a doctype
Simon Lydell [Thu, 5 Nov 2015 19:06:59 +0000 (20:06 +0100)]
Fix scrolling in pages without a doctype

8 years agoMake it possible to blur scrollable elements
Simon Lydell [Wed, 4 Nov 2015 16:27:51 +0000 (17:27 +0100)]
Make it possible to blur scrollable elements

Scrollable elements _are_ focusable (both by using `<tab>` and by using VimFx's
`f` commands), but they aren't marked as such by the browser. In order to
interfere as little as possible, VimFx only blurs elements marked as focusable.
This made it impossible to blur scrollable elements, preventing you from
scrolling the entire page again. This commits now also allows scrollable
elements to blurred as a special-case.

8 years agoRemove trailing space in "it" locale
Simon Lydell [Tue, 3 Nov 2015 19:02:56 +0000 (20:02 +0100)]
Remove trailing space in "it" locale

8 years agoUpdate dependencies
Simon Lydell [Tue, 3 Nov 2015 19:01:11 +0000 (20:01 +0100)]
Update dependencies

8 years agoFix global variable leaks in frame scripts
Simon Lydell [Tue, 3 Nov 2015 18:46:49 +0000 (19:46 +0100)]
Fix global variable leaks in frame scripts

Apparently, frame scripts for the same `<browser>` but from different add-ons
share the same scope. Previously, bootstrap.coffee used to set up a few global
variables. However, those were then leaked to other add-ons in frame scripts.
Now they are explicitly set in the `scope` of each `require`d module instead.

8 years agoMake checkboxes in about:preferences markable
Simon Lydell [Mon, 2 Nov 2015 07:39:55 +0000 (08:39 +0100)]
Make checkboxes in about:preferences markable

8 years agoMerge pull request #561 from cbertoldi/develop
Simon Lydell [Sun, 1 Nov 2015 19:51:05 +0000 (20:51 +0100)]
Merge pull request #561 from cbertoldi/develop

Added italian translation.

8 years agoAdded italian translation.
Carlo Bertoldi [Sun, 1 Nov 2015 18:46:46 +0000 (19:46 +0100)]
Added italian translation.

8 years agoUpdate copyright notices
Simon Lydell [Fri, 30 Oct 2015 18:43:56 +0000 (19:43 +0100)]
Update copyright notices

8 years agoDocument custom commands that access web page content
Simon Lydell [Fri, 30 Oct 2015 18:30:54 +0000 (19:30 +0100)]
Document custom commands that access web page content

8 years agoSuggest using vimfx.js as a config file
Simon Lydell [Fri, 30 Oct 2015 17:16:49 +0000 (18:16 +0100)]
Suggest using vimfx.js as a config file

- bootstrap.js cannot handle non-ASCII characters, but a loaded sub-script can.
- It's cleaner.

8 years agoFix "tab dragged to other window" detection
Simon Lydell [Fri, 30 Oct 2015 16:42:49 +0000 (17:42 +0100)]
Fix "tab dragged to other window" detection

Previously, it detected some tabs opened in the same window as just dragged to
another window.

8 years agoFix uncaught excecption on startup
Simon Lydell [Fri, 30 Oct 2015 15:42:56 +0000 (16:42 +0100)]
Fix uncaught excecption on startup

8 years agoPlay nicer with the dev tools
Simon Lydell [Thu, 29 Oct 2015 07:52:24 +0000 (08:52 +0100)]
Play nicer with the dev tools

- Previously, events that occured in the dev tools were erraneously marked as
  frame events, which made it impossible to blur the dev tools using VimFx.
- Improved Escape key handling: Blurring the dev tools using the Escape key no
  longer toggles the split console.

8 years agoAPI loading: Better safe than sorry
Simon Lydell [Thu, 29 Oct 2015 06:24:21 +0000 (07:24 +0100)]
API loading: Better safe than sorry

8 years agoMake hints mode more robust
Simon Lydell [Wed, 28 Oct 2015 17:53:38 +0000 (18:53 +0100)]
Make hints mode more robust

- Revive `hints.removeHints()`. While looking for an element that happens to
  have the VimFx container ID and removing it perhaps is not very elegant, it is
  very robust. If the reference to the hints container is ever lost (bugs
  inevitably slip through, or if `gulp` is run while in hints mode), unremovable
  hints are left on the screen.

- Enter hints mode _immediately_ when invoking one of the `f` commands. Hints
  mode used to be entered first when the frame script had found all markable
  elements. Remember that communicating with a frame script is asynchronous, and
  that finding all markable elements may take time. In that time span, user key
  presses should be handled in hints mode, not in normal mode.

8 years agoIncrease current mode display {extensi,hacka}bility
Simon Lydell [Wed, 28 Oct 2015 07:20:46 +0000 (08:20 +0100)]
Increase current mode display {extensi,hacka}bility

This commit makes it easy to highlight the current mode using custom CSS and/or
JS, by exposing the logic used for the button.

8 years agoAdd documentation for the button
Simon Lydell [Tue, 27 Oct 2015 06:49:14 +0000 (07:49 +0100)]
Add documentation for the button

8 years agoUse the red icon for ignore mode (for the button)
Simon Lydell [Tue, 27 Oct 2015 06:25:34 +0000 (07:25 +0100)]
Use the red icon for ignore mode (for the button)

Simply mkaing it grayscale didn't stand out enough. I had a hard time seeing the
difference sometimes. Besides, it's a shame having that beautiful red version
lying around but not being used.

8 years agoOptimize the API
Simon Lydell [Mon, 26 Oct 2015 19:09:18 +0000 (20:09 +0100)]
Optimize the API

- Before, if an add-on called `vimfx.set()` around 200 times it could delay
  Firefox's startup time with almost a second. Now there's no delay at all.

- Marks internal variables in public.coffee with a leading underscore. There's
  nothing stopping people from importing them, but no they at least look
  private.

- Remove `vimfx.refresh()`. That is done automatically now, in an efficient way.

- This also makes the test's teardown more robust.

8 years agoFix typos in api.md
Simon Lydell [Mon, 26 Oct 2015 16:33:44 +0000 (17:33 +0100)]
Fix typos in api.md

8 years agoFix typo in vimfx.coffee
Simon Lydell [Mon, 26 Oct 2015 08:09:24 +0000 (09:09 +0100)]
Fix typo in vimfx.coffee

8 years agoMake tests more robust by providing teardown hook
Simon Lydell [Mon, 26 Oct 2015 07:51:05 +0000 (08:51 +0100)]
Make tests more robust by providing teardown hook

8 years agoFix broken setting of the API URL pref
Simon Lydell [Mon, 26 Oct 2015 06:37:49 +0000 (07:37 +0100)]
Fix broken setting of the API URL pref

Accidentally broken in commit 33ed14df. I hadn't noticed before, since the
correct pref still remained in my profiles. Testing in a new profile revealed
the error.

8 years agoFix crash when installing VimFx after `gulp -t`
Simon Lydell [Sun, 25 Oct 2015 18:52:58 +0000 (19:52 +0100)]
Fix crash when installing VimFx after `gulp -t`

8 years agoGet the public API the same way in tests as in docs
Simon Lydell [Sun, 25 Oct 2015 18:43:22 +0000 (19:43 +0100)]
Get the public API the same way in tests as in docs

8 years agoAdd `vimfx.getDefault()` to the public API
Simon Lydell [Sun, 25 Oct 2015 18:38:42 +0000 (19:38 +0100)]
Add `vimfx.getDefault()` to the public API

8 years agoIncrease hackability of the help dialog
Simon Lydell [Sun, 25 Oct 2015 17:44:33 +0000 (18:44 +0100)]
Increase hackability of the help dialog

Provide `data-mode`, `data-category` and `data-command` attributes, that can be
used by custom CSS to, for example, hide unwanted modes, categories and/or
commands from the dialog.

8 years agoFix handling of tabs dragged to new/other windows
Simon Lydell [Sun, 25 Oct 2015 12:06:56 +0000 (13:06 +0100)]
Fix handling of tabs dragged to new/other windows

See #57. This was originally fixed in commit 35522821, but regressed after
adding multi-process support. This fixes it again.

Imprint / Impressum