# Extensions on pdfjs pages

**URL:** <https://discourse.mozilla.org/t/extensions-on-pdfjs-pages/28441>\
**Category:** Development\
**Created:** [May 9, 2018, 3:08pm UTC](https://discourse.mozilla.org/t/extensions-on-pdfjs-pages/28441 "2018-05-09T15:08:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![paolocam](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@paolocam](https://discourse.mozilla.org/u/paolocam)\
**Post date:** [May 9, 2018, 3:08pm UTC](https://discourse.mozilla.org/t/extensions-on-pdfjs-pages/28441/1 "2018-05-09T15:08:22Z")

</div>

Since Firefox 60 it seems extensions are not being injected on the embedded pdfjs viewer pages?

Can anyone confirm this issue?

Is this a wanted feature documented anywhere?

---

<div class="post-metadata">

**Author:** ![NilkasG](https://avatars.discourse-cdn.com/v4/letter/n/0ea827/32.png) [@NilkasG](https://discourse.mozilla.org/u/NilkasG)\
**Post date:** [May 9, 2018, 3:26pm UTC](https://discourse.mozilla.org/t/extensions-on-pdfjs-pages/28441/2 "2018-05-09T15:26:42Z")

</div>

I don’t know about any documentation of if/when this changed, but I can confirm that it is not possible to inject styles into the inline PDF viewer. I just tried that a few days ago in FF60.

---

<div class="post-metadata">

**Author:** ![freaktechnik](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/freaktechnik/32/37766_2.png) [@freaktechnik](https://discourse.mozilla.org/u/freaktechnik)\
**Post date:** [May 9, 2018, 4:18pm UTC](https://discourse.mozilla.org/t/extensions-on-pdfjs-pages/28441/3 "2018-05-09T16:18:37Z")

</div>

See [https://bugzilla.mozilla.org/show\_bug.cgi?id=1456485](https://bugzilla.mozilla.org/show_bug.cgi?id=1456485), so essentially it’s not an issue, it’s a feature for normal extensions.

---

<div class="post-metadata">

**Author:** ![paolocam](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@paolocam](https://discourse.mozilla.org/u/paolocam)\
**Post date:** [May 9, 2018, 4:38pm UTC](https://discourse.mozilla.org/t/extensions-on-pdfjs-pages/28441/4 "2018-05-09T16:38:49Z")

</div>

![](https://us1.discourse-cdn.com/flex001/uploads/mozilla/original/3X/3/9/39af809b209558656fb60eafbcc58c46e8658962.jpg)

best I could find…

I’m not sure why but bugzilla won’t let me access the internal bug linked in that issue. I suppose it says user extension are restricted on some pages…

Are you aware of any documentation on this? Maybe in doing so they added some manifest persmission to be granted for specific pages?

---

<div class="post-metadata">

**Author:** ![anon31560143](https://avatars.discourse-cdn.com/v4/letter/a/7bcc69/32.png) [@anon31560143](https://discourse.mozilla.org/u/anon31560143)\
**Post date:** [June 24, 2018, 8:18pm UTC](https://discourse.mozilla.org/t/extensions-on-pdfjs-pages/28441/5 "2018-06-24T20:18:02Z")

</div>

What is the current situation on this?  
Do I need to add some permission for injecting content scripts to **pdf-viewer** pages - or is it just not possible anymore to use extensions in ff pdf viewer?  
Is there a way to inject content scripts into pages in **reader mode**?

---

<div class="post-metadata">

**Author:** ![juraj.masiar](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/juraj.masiar/32/30587_2.png) [@juraj.masiar](https://discourse.mozilla.org/u/juraj.masiar)\
**Post date:** [June 25, 2018, 8:26am UTC](https://discourse.mozilla.org/t/extensions-on-pdfjs-pages/28441/6 "2018-06-25T08:26:11Z")

</div>

**Current situation regarding content scripts in PDF and Reader mode:**

**PDF:** (resolved as invalid - “This is intentional.” ☹ )

> **[1454760 - content\_scripts won't load with pdf.js tabs](https://bugzilla.mozilla.org/show_bug.cgi?id=1454760)**
>
> RESOLVED (nobody) in WebExtensions - Untriaged. Last updated 2018-06-19.

**Reader mode:** (P3 normal)

> **[1371786 - Allow content scripts on reader mode pages](https://bugzilla.mozilla.org/show_bug.cgi?id=1371786)**
>
> REOPENED (bob.silverberg) in WebExtensions - Untriaged. Last updated 2018-06-19.

**PLEASE VOTE for these bugs!**

PS: one more bug related to this is content scripts on [mozilla.org](http://mozilla.org) pages:  
[https://bugzilla.mozilla.org/show\_bug.cgi?id=1310082](https://bugzilla.mozilla.org/show_bug.cgi?id=1310082)  
(it’s invalid as well now but at least they mentions how you can override it in `about:config` page by clearing `extensions.webextensions.restrictedDomains` value.
