PubPeerFoundation / pubpeer_zotero_plugin

Plugin to show if references in Zotero have PubPeer comments
149 stars 2 forks source link

Open links to PubPeer in default browser #17

Open bencomp opened 3 years ago

bencomp commented 3 years ago

I installed version 0.0.6 in Zotero 5.0.93 on MacOS.

When I click a link to the PubPeer comments from the Zotero item pane, it looks like the PubPeer page opens in the Zotero main window, because when I close the PubPeer page, no Zotero window is left.

I would like to read related content in my default browser instead of having browser windows open within Zotero.

Aariq commented 3 years ago

On a related note, I can't even right click the link and get a "open in browser" option or something like that.

retorquere commented 3 years ago

I think we'll have to catch the link being clicked with an onclick handler, and then open the url using the external-protocol-service (see openURL in preferences.js in the zotero sources)

roaldarbol commented 3 years ago

Just checking whether this is being followed up on? On MacOS Big Sur with the latest plugin release I get the following pop-up window with a Java error. I guess it's supposed to open a tab in the default browser?

Screenshot 2021-06-09 at 16 33 30
retorquere commented 3 years ago

This isn't an error popup, it's just a message box. You can select the text in it.

roaldarbol commented 3 years ago

Ah, fair enough. Maybe it could be considered changing the warning symbol then (maybe just to the PubPeer logo?). Are you planning on making it open links directly in the browser (the scite.ai plug-in does this and it makes for a better user experience in my view)? Or maybe having a "Copy link" button next to OK?

retorquere commented 3 years ago

The warning symbol is part of Zotero when using this particular popup, to replace it you'd need to construct the UI yourself using XUL.

I hadn't actually planned to work on the UI. I'll assist where I can but I can't spend much time on it TBH, and as I mentioned before, UI isn't my forte.

roaldarbol commented 3 years ago

Ah fair enough, no worries. Thanks for the plug-in regardless. :-)

brandonStell commented 2 years ago

@retorquere it seems that links still open in Zotero and not in the default browser. Do you see a fix to that?

brandonStell commented 2 years ago

11.8 gets closer to doing the job: clicking now opens a browser (but doesn't load the link).

retorquere commented 2 years ago

I posted it on the wrong issue. It doesn't work yet.

retorquere commented 2 years ago

There seems to have been a regression in Zotero wrt opening links from html panes; I've posted on zotero-dev but that usually take a fair bit of time to get attention.

github-actions[bot] commented 2 years ago

:robot: this is your friendly neighborhood build bot announcing test build 0.0.11.10 ("cleanup")

Install in Zotero by downloading test build 0.0.11.10, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

retorquere commented 2 years ago

.10 has a workaround. It's not as pretty as I wanted it to be, but it does reliably work.

enozkan commented 1 year ago

This is not working for me (and actually has never worked). Using the latest Zotero with the latest plugin (0.0.16) on Mac OS 13.2.1 (M1 chip). Clicking on the link takes me to a browser page but nothing will happen (Firefox or Chrome). Chrome says I am trying to unsuccessfully open this page: chrome://zotero/content/standalone/standalone.xul#

If I could copy the link in the PubPeer tab, that would be a nice workaround. Unfortunately, I can't. And PubPeer links are long.

The issue remains if I disable all non-stock plugins.

retorquere commented 1 year ago

That's hardly a surprise because this fix was never rolled into a release, as I got no feedback on whether it solved the problem or not. I'll see whether I can resurrect the fix, but more than a year of changes has passed, so this may take me a bit.

enozkan commented 1 year ago

Thanks for the quick response. I'd be happy to try out the fix and report back.

puzzledhedgehog commented 1 year ago

Hi, when I click on the link to a PubPeer page, a "what program do you want to use to open the link" box comes up. I told it to use Chrome, and it opens a new Chrome window -- but it doesn't have the URL that I wanted to go to. I can't select the link to copy it, and I can't rightclick on it to open a context sensitive menu. So, the plugin is useful in that I can tell if PubPeer comments for this document exist, and how many of them there are. But it's not at all convenient to navigate to them.

HickoryHeck commented 1 year ago

I'm also experiencing the same problem as @puzzledhedgehog, and I would be really interested in having a workaround that lets me select or click through to a link.

adamtywoniak commented 1 year ago

I'm also experiencing the same problem as @puzzledhedgehog, and I would be really interested in having a workaround that lets me select or click through to a link.

I have the same experience.

Right-clicking the Zotero entry and choosing the bottom option Check for comments on PubPeer produces a JavaScript message box from which the link can be selected and copied.

image

image