Comparing changes
Open a pull request
- 1 commit
- 1 file changed
- 2 commit comments
- 1 contributor
Showing you all comments on commits in this comparison.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
I think the Will this (PDF viewer detection) technique work when we want to share code between extensions for different browsers? We'd have to add code to detect each different browser's PDF viewer, right? If you need to inject a content script into the page in order to detect the PDF viewer, doesn't that mean you need the |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
robertknight
Jan 6, 2016
Contributor
If you need to inject a content script into the page in order to detect the PDF viewer,
doesn't that mean you need the <all_urls> permission to be able to inject content scripts into any page?
Not if you have the Chrome implicit "activeTab" permission
Will this (PDF viewer detection) technique work when we want to share code between
extensions for different browsers? We'd have to add code to detect each different browser's PDF viewer, right?
In Firefox we can definitely detect PDF.js, although we might not need to replace the viewer if it is already HTML based. I'm unsure about Safari and Edge. My inclination is that we can cross that bridge when we come to it - and possibly take a different approach in other browsers if necessary.
Not if you have the Chrome implicit "activeTab" permission
In Firefox we can definitely detect PDF.js, although we might not need to replace the viewer if it is already HTML based. I'm unsure about Safari and Edge. My inclination is that we can cross that bridge when we come to it - and possibly take a different approach in other browsers if necessary. |
I think the
Content-Typeheader is available after the page has loaded, for what it's worth (or if it's not we would just listen for it on page load all the time, whether h is active or not, and store it).Will this (PDF viewer detection) technique work when we want to share code between extensions for different browsers? We'd have to add code to detect each different browser's PDF viewer, right?
If you need to inject a content script into the page in order to detect the PDF viewer, doesn't that mean you need the
<all_urls>permission to be able to inject content scripts into any page? (The same permission that we need to look atContent-Type.)