Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only works on some papers on Firefox #9

Open
greaber opened this issue Sep 17, 2018 · 11 comments
Open

only works on some papers on Firefox #9

greaber opened this issue Sep 17, 2018 · 11 comments
Labels

Comments

@greaber
Copy link

greaber commented Sep 17, 2018

Hi, I haven't tested under Chrome, but with Firefox, this extension seems to only work for some papers (maybe it works on about a third of papers and fails on two thirds). A random example of a paper it doesn't seem to work for is https://arxiv.org/pdf/1705.10915.pdf

@musically-ut
Copy link
Owner

Thanks for the report!

Are you by any chance using the Developer or Nightly version of Firefox?

I've noticed that on the last versions of Firefox, the API call to fetch the paper name does not happen sometimes. Perhaps if we match our configurations, we might be able to get to the end of this issue.

(On Chrome, the paper's name is fetched and the Title of the tab is updated correctly.)

@greaber
Copy link
Author

greaber commented Sep 17, 2018

Hi, thanks for the quick response. Yeah, it does work fine on Chrome. I'm not using the Developer or Nightly version. I'm using 62.0 (the latest standard version) on OS X.

@musically-ut
Copy link
Owner

I've verified that it indeed is now happening on Firefox 62.0, not just the Developer versions. Curiouser and curioser.

@musically-ut
Copy link
Owner

I'm very sorry that I don't have good news on this front.

It turns out that with Firefox 62, the extensions have stopped running on all PDF files. The reasoning behind it seems to be security related (PDF files currently have more privileges; they run with fewer restrictions than the standard browser context).

This is the associated bug on Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1454760

I've added my comment at the bottom and will keep my fingers crossed.

I'll keep this bug open until there is a concrete resolution either in the direction of WONT-FIX (in which case I'll take down the extension from the Firefox store) or some resolution.

:(

@braham-snyder
Copy link

braham-snyder commented Oct 11, 2018

@ anyone interested in this issue, remember to vote for the bug on bugzilla (if you haven't done it before: you can login with your github account, then open the "Details" section for the vote button)

@cipri-tom
Copy link

The voting thing is not directly obvious, you need to check the box and click "Change my votes". So please do it and let's hope the functionality is restored soon.

@musically-ut so the extension is fully blocked on PDFs ? Is there no workaround ? :(

@musically-ut
Copy link
Owner

I had some success with the UserScript: https://github.com/musically-ut/arXiv-title-fixer#userscript but I have since switched back to Chrome for research. YMMV.

Hope that helps.

@j3soon
Copy link

j3soon commented Sep 2, 2019

@musically-ut Hi,
I somehow achieved this by some hacky workaround here: https://github.com/j3soon/arxiv-utils

  1. I intercept the PDF requests, and launch my custom extension page instead.
  2. My custom page embeds the original PDF into its html content.
  3. Change the title of my custom page. It looks exactly the same as the original PDF viewer.
  4. If the user bookmarked this page, intercept it and change the url to the original PDF.

It adds a custom PDF container, and isn't really elegant...

If you think this workaround is important, I may find some time to open a PR here.

@cipri-tom
Copy link

YAY! Thanks @j3soon ! I've had this very same idea for hacking around the PDF limitations of Firefox, but never got round to implement it, as I have 0 experience with WebExtensions.

I also saw that you updated the bugzilla page of this annoyance! Thank you!
I hope people will be receptive and lift this limitation.

May I go so far and suggest you make a separate extension to catch all PDF requests (not just arXiv) and render them in a "local" PDF viewer? This would allow all the other extensions to work again with PDFs.

Many thanks for making this!

@j3soon
Copy link

j3soon commented Sep 3, 2019

@cipri-tom I like your idea on installing a "local" PDF viewer that makes all other PDF extensions work again.

However, the custom page URL for something like:

https://arxiv.org/pdf/1905.10071.pdf

is something as the follows:

moz-extension://f3b3f2f6-55f4-4001-8cad-775e86a0f623/pdfviewer.html?target=https://arxiv.org/pdf/1905.10071.pdf
  • Redirecting all PDF requests seems to be useless for extensions such as arXiv-title-fixer, which only works on specific URLs.

  • The extension captures the bookmarking actions on custom PDF page, making the users bookmark the original url instead: https://arxiv.org/pdf/1905.10071.pdf.
    But plugins like OneTab will save the custom url, which only works as long as this extension is enabled.

Maybe I can implement a separate "local" PDF viewer extension with some friendly documentation.

  • For PDF extensions that works for URLs, installing the "local" PDF viewer extension should make them work again. (I'm not really sure about this, maybe you can provide me one or two extensions that works before the firefox update? So I can try it to make sure my assumption is correct.)
  • For PDF extensions that works for certain PDF URLs, they can just copy the codes into their extension and can run independently.

@musically-ut
Copy link
Owner

@j3soon Thanks! I'll include a link to arxiv-utils as an alternative in the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants