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

Tab names not being renamed in firefox for PDF on arxiv for new papers #40

Closed
akhilkedia opened this issue May 8, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@akhilkedia
Copy link

Describe the bug
Tab names in firefox for PDF on arxiv are no longer being renamed to paper title. This bug only occurs for new papers on arxiv after some recent date (eg https://arxiv.org/abs/2402.12354), tab names on older papers (eg https://arxiv.org/abs/1902.04760) seem to be renamed correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://arxiv.org/abs/2402.12354
  2. Click on View PDF
  3. Tab is not renamed to paper title

Expected behavior
Tab should be renamed to paper title for the pdf page.

Screenshots

  • Developer Console on the "abs" page shows "[arXiv-utils] Set document title to: LoRA+: Efficient Low Rank Adaptation of Large Models | Abstract.".
    • On clicking view pdf, only the following is printed in the console "Partitioned cookie or storage access was provided to “https://arxiv.org/pdf/2402.12354” because it is loaded in the third-party context and dynamic state partitioning is enabled.
      PDF 667dcc7fab22827c75d0e4aa0b17241d [1.5 pdfTeX-1.40.25 / LaTeX with hyperref] (PDF.js: 4.1.342 [e384df6f1])"
  • Inspect the background script logs shows no errors.

Desktop (please complete the following information):

  • OS: Ubuntu
  • Browser Firefox
  • Version 125.0.3

Bug was successfully reproduced in a new browser profile with no other extensions installed. The "abs" page on arxiv is being renamed successfully. Clicking the extension icon to open the pdf from the abs page also successfully renamed the pdf.

Thank you so much for making this extension! I will try to poke around the code to see if I can identify the cause of this issue..

@j3soon j3soon added the bug Something isn't working label May 8, 2024
@j3soon
Copy link
Owner

j3soon commented May 8, 2024

Thanks for the bug report. I can reproduce it on my end.

I believe it's due to the arXiv site link change from Download PDF to View PDF. The new View PDF link seems to point to a different URL (without trailing .pdf), which isn't re-directed to the custom PDF viewer.

Currently, this issue can be bypassed by clicking the extension button (with arxiv icon) instead of clicking View PDF.

If you want to open a PR, I suggest you look into the redirection pattern here:

// The match pattern for the URLs to redirect
// Note: `https://arxiv.org/pdf/<id>` is the direct link, then the url is redirected to `https://arxiv.org/pdf/<id>.pdf`
// we capture only the last url (the one containing `.pdf`).
// However, if `https://arxiv.org/pdf/<id>/` is the direct link, no redirection will happen,
// we need to capture this too.
const redirectPatterns = [
"*://arxiv.org/*.pdf*", "*://export.arxiv.org/*.pdf*", "*://browse.arxiv.org/*.pdf*",
"*://arxiv.org/*pdf*/", "*://export.arxiv.org/*pdf*/", "*://browse.arxiv.org/*pdf*/",
];

I think the redirection pattern need to be updated.

@zinhuofc
Copy link

you don't want to go back to developing alltrans, you abandoned your users very well

@j3soon j3soon closed this as completed in 7e658d9 Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants