0

I'm running Firefox 77 on Windows. I use Firefox's built in PDF.js viewer as my default. However, I would like to make a modification to the CSS for the viewer (specifically, I'd like to change the

.pdfViewer .page {
...
margin: 1px auto -8px auto
...
border: 9px solid transparent
...
}

to margin: 1px auto -3px auto and border: 1px dashed transparent) .

How would I do this? I don't think this is something for userChrome because it's not part of the interface, yet I don't see where the pdf.js code is stored (Search Everything has no relevant results for pdf.js, pdf.worker.js, or viewer.css). A userstyle/userscript probably won't work since it's an internal page, so I'm out of ideas. Can someone help me with this?

Edit: tried a userscript, didn't work even though it showed that the script was active on the page. Probably that means that the userscripts can't affect system files

1 Answer 1

0

It turns out that you can use userContent.css which will style actual pages. So, I copied

.pdfViewer .page {
    margin: 1px auto -3px auto !important;
    border: 1px dashed gray !important;
} 

into my userContent and it worked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .