philc / vimium

The hacker's browser.
https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb
MIT License
23.05k stars 2.48k forks source link

reload vimium disabled keys on url change #2175

Open YayC opened 8 years ago

YayC commented 8 years ago

I was hoping to have a different set of keys disabled for gmail for inbox and individual message views. When I open a message, though, the disabled keys don't change (e.g., I can't scroll down with "j" which should no longer be disabled).

When I click on the vimium logo, it does show the correct set of disabled keys, and when I refresh the page, the correct keys are disabled.

Would there be a way to listen for javascript-triggered url changes, and update disabled keys based on the new url accordingly? In this case the url changes from https://mail.google.com/mail/u/0/?zx=12345#inbox -> https://mail.google.com/mail/u/0/?zx=12345#inbox/12345

versions: Vimium 1.5.6, Chrome 51.0.2704.84, Mac OS X 10.11.5

smblott-github commented 8 years ago

You need to use a more precise regular expression. E.g., for the inbox:

https://mail.google.com/mail/u/0/#inbox$

And for messages:

https://mail.google.com/mail/u/0/#inbox/*

(I haven't tested these.)

The rules are Javascript regular expressions, except that * is automatically replaced with .*.

YayC commented 8 years ago

Thanks for the quick reply! It actually appears to be a frame issue-- when I click inside the message, the right keys start working. Sorry for not testing more thoroughly before posting this issue.

YayC commented 8 years ago

Now it is just working without a need to click inside message body, so maybe that wasn't the issue. In any case, this can be closed, thanks again.