vimium-c icon indicating copy to clipboard operation
vimium-c copied to clipboard

Copying Vimium-c files into another extension of MV3?

Open jaywonchung opened this issue 1 year ago • 1 comments

Hi,

Recently Google Scholar released the Google Scholar PDF viewer extension, which is really nice, except that I can't scroll with my usual Vimium keybindings. It also uses the V3 manifest, which does not allow sourcing scripts from another extension.

So I thought it would be possible to directly copy over files from vimium-c into a locally forked version of the Google Scholar PDF viewer extension. So I copied over the entire lib directory and added <script src="/lib/injector.js"></script> in all HTML files., but unfortunately keybindings still do not work. Do you think copying files could potentially work? If so, which files should be copied?

Thanks a lot.

jaywonchung avatar Mar 19 '24 23:03 jaywonchung

Hello thanks for your recognition first!

The lib folder is not necessary; lib/injector.js is only designed to work in a MV2 target. So up to now there's no verified way to make Vimium C content scripts work on another MV3 extension.

You may try add lib/injector.js, content/vimium-c.js and content/injected_end.js manually, although there may be quite a few errors to fix...

gdh1995 avatar May 19 '24 18:05 gdh1995