operasoftware / pdf.js

PDF Reader in JavaScript
Apache License 2.0
20 stars 4 forks source link

Local files not opening if browser not running #16

Open skoogit opened 10 years ago

skoogit commented 10 years ago

Local files doesn't open if the browser is'nt already running, they just open the save-dialog.

If browser is already running it works fine.

I have the 'Allow access to file URLs'-box ticked.

Rob--W commented 10 years ago

That problem occurs because the extension is not loaded yet when Opera starts.

This can only be solved when Opera enables the streamsPrivate or declarativeWebRequest APIs.
When the streamsPrivate API is made available, the code at https://github.com/Rob--W/pdf.js/issues/1 can be immediately be used. If Opera decides to support the declarativeWebRequest API on Opera stable, then I'm willing to contribute the code that uses this API. This API is not even available on Chrome stable, and since the streamsPrivate API is superior, I prefer it over the latter method.