hints: do not execute `click` in addition to opening hints
authorPatrick Steinhardt <ps@pks.im>
Sat, 20 May 2017 16:56:18 +0000 (18:56 +0200)
committerPatrick Steinhardt <ps@pks.im>
Sat, 20 May 2017 16:56:18 +0000 (18:56 +0200)
commit0237d64daed59ad00b64a998c2d619fb78278633
tree85c9c81081f8b5f753da546c9fb49b165edeae95
parent841cb5f34af269264a755ee35d7a372e17807526
hints: do not execute `click` in addition to opening hints

When the element which we are about to open has a "href" attribute, we
will execute either `window.open` or set the `window.location.href`
attribute to the target's reference. But as we forgot to call `return`
here, we will also execute the code to open elements without "href"
attribute. In the case of opening a new window, we will now first open
the new window and then also set the current window's URL to the target,
which is obviously wrong.

Fix the issue by putting the excution of `click()` inside an
else-branch.
src/scripts/hints.js