shivaprsd / doqment

Mozilla's HTML5 PDF Viewer with Reader-mode add-on. 📖
https://shivaprsd.github.io/doqment/src/pdfjs/web/viewer.html
MIT License
33 stars 1 forks source link

Incompatibility with Zotero Connector #7

Closed kkensuke closed 1 year ago

kkensuke commented 1 year ago

doqment is a very useful extension, but it seems it is incompatible with Zotero Connector for Firefox, that is, I can't save PDFs. I often use Zotero Connector to save PDFs from arXiv, so it would be great if I could use them simultaneously.

shivaprsd commented 1 year ago

Sorry to hear that.

Can you explain the problem a bit more? I don't know what Zotero Connector is. Is that another extension? How does doqment clash with it?

If you just want to download PDFs to your hard disk there is a button on the toolbar. But I don't think this is what you are aiming for.

kkensuke commented 1 year ago

I'm sorry for the lack of explanation.

Environment; Browser: Firefox 112 OS: Mac Ventura

When doqment is disabled, Zotero Connector can detect and save PDF files to my Zotero database with one click. However, when doqment is enabled, Zotero Connector can't detect and save them. (Of course, I can save them to my hard disk from a button on the toolbar regardless of doqment)

https://user-images.githubusercontent.com/47603428/236570841-a2eb1d2c-efb6-4831-9efb-b9fed22f2788.mov

This movie is from Zotero homepage

By the way, I found the change of URL; https:// ... .pdf -> moz-extension://a4f87a59-4353-4dfe-92da-010260afb380/pdfjs/web/viewer.html?file=https:// ... .pdf after enabling doqment. If this is the cause of the problem, I should report this to the Zotero Connector community instead of here because the prefix would be added as long as I use doqment.

shivaprsd commented 1 year ago

First of all, thanks for introducing me a software I didn't know I needed. 😊

No, the problem is not just the change of URL. Extensions can't grab data from other extensions' pages (due to security reasons), so Zotero Connector disables itself on doqment's viewer page. So simply reporting this issue there is likely to be dismissed as wont-fix.

The only workaround now is to bypass doqment altogether when intending to save the PDF to Zotero. Some ways I can think of:

  1. Use Save to Zotero button directly on the arXiv page, without opening the PDF. This automatically saves both metadata and the PDF (recommended method by Zotero docs also).
  2. Allow Zotero Connector to run in private tabs (extensions are disallowed by default); then right click on the PDF link to open it in a private window.
  3. Download the file to disk and add manually (this sucks).

Tell me if both 1 and 2 above might be inconvenient to you. ~Meanwhile let me think of an actual solution.~

kkensuke commented 1 year ago

Use Save to Zotero button directly on the arXiv page, without opening the PDF. This automatically saves both metadata and the PDF (recommended method by Zotero docs also).

I should have noticed this earlier. It takes less time to save the PDF and its metadata than after opening the PDF. 😂

Thank you so much!