-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Chrome] Need option to open PDFs by default #8
Comments
@Adr0it Thanks for stopping by! Can you explain how automatically opening offline PDFs would help your bookmarking extension? I am not able to see any connection there. 😕 Can you also show me how you are injecting your content script? My main concerns here are permissions and consistency. We would need wide host permissions to run content scripts in all In Firefox doqment auto-opens all URLs. This is because there the intent is to replace the default viewer (as doqment is only a modified version of it). In Chrome the design is different both due to technical limitations of MV3 and for letting users use doqment as a second PDF viewer without invading their privacy. |
Thanks, I got your intent now. I guess this could be done a bit more neatly with Declarative Net Requests redirect rule, or even The problem with this is that we are relying on the Even if we find a way, this will inevitably need a permission escalation, that can result in the extension being temporarily blocked on the Chrome Web Store, pending a manual review. Yet I understand the desire for convenience, so let me edit the title to better reflect the general case. This has to be implemented thoughtfully. |
I figured out a way to do this with dynamic content scripts so that the permissions can remain optional. Now on dev branch: 85f740e. @Adr0it It is loosely based on your idea, so thank you! Can you please try it out and get back? Just right click on the extension action and switch it on via the menus (first the "Always allow..." menu followed by the other). |
@Adr0it Thanks! Can you give your feedback on the interface, i.e. having to go through two menus to enable it? I did it that way to make the code cleaner, and enabling it requires enabling the first menu anyway. Did you find it cumbersome? Would you find it confusing if I had not told you exactly what to do? P.S.
Or, if you don't use command line, you can first select |
Fixed in v0.6. |
Hello, first of all, I really like your pdf viewer. Originally, I was trying to create an extension with Chrome's default pdf viewer, and I basically couldn't access any of the html I needed, so I'm using this instead. It's funny because all I wanted to do was make a bookmarking extension that gets the title, current page, and first page canvas thumbnail, but it all turned out to be this complicated. I'm more of a hobbyist, so I don't know if I will successfully be able to modify this extension to communicate with my own, but theoretically I should be able to looking at the Chrome documentation (messages between extensions).
The only small thing I would like is for the extension to open the newViewer on its own whenever an offline pdf document is detected like how the Adobe Acrobat PDF extension functions. For my own personal use, I basically modified the code to have a content script signal the service worker to open the newViewer and close the original tab.
The text was updated successfully, but these errors were encountered: