Looking for workaround for PDF viewer "content script restriction" issue

As you know, addons are not allowed in the default PDF viewer:

But since the PDF viewer can be implemented as a web-application, I’m thinking, there could be a simple solution - force Firefox (somehow) to open PDF in a web-application, instead of default browser viewer. It could actually be a clone of the default viewer (I think I’ve seen it somewhere on github), just running on a webpage instead of browser.

Some features would probably stopped working, but for viewing it could be good enough and all addons would work there!

What do you think?

1 Like

I am looking for a workaround too. Mozilla docs do not mention any workarounds. The bugs and issues are vague at best. Might be better to go for Chrome.

We found a workaround in the arxiv-utils extension: the content scripts are blocked in the native extension. But if you use pdf.js from a domain, rather than as an extension, then scripts are allowed.

So we load pdf.js from mozilla’s own servers:

2 Likes