brookhong / Surfingkeys

Map your keys for web surfing, expand your browser with javascript and keyboard.
https://chrome.google.com/webstore/detail/surfingkeys/gfbliohnnapiefjpjlpjnehglfpaknnc
MIT License
5.41k stars 484 forks source link

automatic loading of local pdf files through surfingkeys pdf viewer #1249

Open disberd opened 4 years ago

disberd commented 4 years ago

Forgive for not abiding by the issue format but this is more a question on how to do something with surfingkeys if possible.

I would like to use surfingekys pdf viewer as my default pdf viewer due to the nice shortcuts I could use for navigation. Unfortunately, when I open local files through chrome they are by default opened with the native viewer (online pdfs are correctly loaded through surfingkeys). Is there a way to force the extension's pdf viewer to also be used for local files? (even by custom javascript to be injected via e.g. tapermonkey) I tried substituting the file path to the "url" of an online pdf open on surfingkey viewer but it just opens an empty container without displaying the actual pdf file.

az-pz commented 2 years ago

You should allow access to file urls from extension settings page. It is disabled by default.

image

Bonus: You can browse local file system from chrome using file:/// url.