Vimium: Vimium doesn't work on sites with disabled JavaScript

Created on 5 Sep 2018  Â·  13Comments  Â·  Source: philc/vimium

Today I've updated my Chromium browser and unfortunately I've noticed that Vimium's scrolling doesn't work on sites that have JavaScript disabled (I've set it to be disabled by default, allowing only certain sites to use it). Highlighting links, visual mode etc. works.

Chromium - Version 69.0.3497.81 (Official Build) Arch Linux (64-bit)
Vimium - version 1.64

All 13 comments

So, on some sites, link hints and visual mode work, but scrolling does not. Are there any errors reported in the dev console? Could you share one specific site?

It's not on some sites, but on every site I've visited since the update.

I just updated Chrome on Windows from version 68 to 69 (69.0.3497.81) and the same thing happened.
Before update, just in case if it's related to my syste,, or overall bug, I tested if scrolling works on sites while JS is disabled and it worked (reddit and stackoverflow). So clearly something with the update messes things up.

E.g. stackoverflow.com
JavaScript enabled, scrolling works and dev console spits some output:

Powered by AMP ⚡ HTML – Version 1535566825959 https://stackoverflow.com/

JS disabled and scrolling doesn't work. No output:

I guess it's easy to reproduce. Just use the updated browser and try to scroll on a site with JS disabled.

Disabling smooth scrolling in Vimium options makes scrolling possible again. Not the best experience, but working :)

Chrome 69 disables requestIdleCallback and requestAnimationFrame on pages which don't allow JavaScript, influencing those without allow-scripts sandbox flag and those JS-disabled.

Thanks, @gdh1995.

So, if we implemented our own requestAnimationFrame, then it would work, right?

Yes, but I'm afraid we have no way to polyfill it - setTimeout might have broken, too.

In fact, although Chromes since v68 allow setTimeout on sandboxed pages, but if JS is disabled in browser content settings, setTimeout will also fail to work.

An (ugly) idea is, we may post message to backend and then wait a response to do something.

I don't know how Chrome extensions work etc. But maybe this will give you some ideas.
Because right now I can't scroll with d,u,j,k. I'm using numpad controls. PgUp, PgDown, Home, End, Arrows - and all of them work flawlessly. Maybe there is some API that exposes these keys so they can be bound in a vim manner?

The problem seems to be what @gdh1995 said above. There's no API that scrolls in the way that Vimium (smooth) scrolls.

A good news is, on Chrome Dev 70.0.3538.9 x64, Win 10 x64, the requestAnimationFrame and requestIdleCallback work again. Therefore, this is indeed a bug of Chrome.

But according to my observation, Chrome never fixes such behavior bugs in a same major version... So we may need to add some chrome-version-specified code to work around this.

Disabling smooth scrolling in Vimium options makes scrolling possible again. Not the best experience, but working :)

Just want to emphasize here that disabling Smooth Scrolling does resolve this bug.

I'm a big fan of disabling Javascript on bloated pages using the Quick Javascript Switcher extension. To have Vimium and QJS play nice I've switched to non-smooth Vimium scrolling. It's a jarring way to navigate the page but better than using the arrow keys ;)

Looking forward to either chrome-version-specific Vimium solution or for Chrome 70 to come out (Chrome versions come out every 6-8 weeks -- see version history here)

I just updated to Chrome 70.0.3538.67 and glad to report smooth scrolling once again works for sites with disabled JS. I think this bug can be safely closed now. Thanks!

I just updated to Chrome 70.0.3538.67 and glad to report smooth scrolling once again works for sites with disabled JS. I think this bug can be safely closed now. Thanks!

I confirm :)

Was this page helpful?
0 / 5 - 0 ratings