jpablobr / simple-auto-scroll

A speed-customizable auto-scroll Google Chrome extension.
84 stars 30 forks source link

PDF scrolling #3

Closed andyrichardson closed 6 years ago

andyrichardson commented 7 years ago

I'm trying to use this extension to scroll sheet music while playing piano, something I think many pianists would want to do. Unfortunately, despite allowing file:// access to the extension, scrolling does not work inside the chrome PDF viewer.

Would this be possible?

Henry-E commented 7 years ago

PDF scrolling in Chrome is basically all I want to use this extension for. Did you ever figure out a solution?

andyrichardson commented 7 years ago

Nope I did not. Just a thought - maybe uploading the pdf to Google Drive might solve the problem although I haven't tried.

Henry-E commented 7 years ago

Tried using pdf from many different sources, including ones hosted online and by google drive. None seem to work.

thatweirdcoder commented 7 years ago

PDF is never working :(

RayBB commented 7 years ago

I spent some time researching the issue today since it has been a few years. It seems that the issue is the PDF viewer isn't actually part of the DOM. It's just an embedded plugin. There's no API to scroll, but there is an open issue for it here.

I also looked into trying to trigger a scroll or keydown event but for security reasons, that's not possible in Chrome.

Since the pdf read is an extension itself, it could add a feature to for messages from other extensions. More info here.

Also, I thought about making a bookmarklet (and found a pretty cool one here) but the code from bookmarklets can't make the page scroll either.

The only quick fix I have is that you can copy the code of that bookmarklet and then right click on your pdf (in Chrome) and past the code in the console. That'll make it auto scroll. I also forked that gist above here so that the escape button stops and starts the scrolling.

jpablobr commented 6 years ago

Thanks for the info, @RayBB. I'm sure people will still find it valuable. But yes, don't think I have the time at the moment to look into this. For now, I'm going to close the issue but anyone can still feel free to re-open in case there's more info. Or even better, a PR submission.