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
Opening zotero links (zotero://...) also opens an empty window #498
Comments
So I started looking into this issue and think that there are 2 components. In the firefox client, if Zotero is in tab mode, opening the links creates a new blank tab. If they're control+clicked, the tab opens in the background; If they're clicked, it opens in the foreground. The other component is the new window opening in the standalone client. From what I gather, the zotero links are passed from the tinyMCE plugin linksmenu to the zoteroHandler to the loadURI function in zoteroPane.js - at which point the standalone client passes the zotero links to the function openInViewer in standalone.js If we didn't want to alter the zotero protocol handler as fbennett did, we could put in an 'if statement' with regex matching for the zotero scheme in both the loadURI and openInViewer functions that opens the tab or window and then closes it. I don't think we can prevent the window/tab from opening (although I definitely need to get a better understanding of Mozilla's window/tab structure, so I could be wrong). I'll try to implement this and report back. |
Thanks for checking on this! Would be great if you can get it to work. |
What needs to happen in general (at least from a Windows perspective), is that Zotero needs to be registered as a global (system-wide) handler for the Sorry, I can't currently offer a lot of help with this, but IMO this would be the direction to take. You can start with the Anyway. just my two cents. |
Zotero Standalone is already registered as a system-wide handler for the The cause of this issue is most likely that |
or, at least in Standalone, https://github.com/zotero/zotero/blob/4.0/chrome/content/zotero/bindings/styled-textbox.xml#L159 should pass all links to |
That is what |
Any reason not to register |
Just that we do not provide an installer. |
Though yeah, going through the system for our own protocol seems a bit roundabout, so perhaps we should have tinyMCE pass to |
I added a commit that special cases zotero links. It works on my end (Windows 7) and don't think it is dependent on the operating system.*
I looked into closing the blank windows/tabs based on the calling URL or the content loaded as a means of creating a more 'versatile' solution. This would allow alternative protocols like Evernote or OneNote (or other, unforeseen protocols) to open their links without the annoyance of these blank windows/tabs as aurimasv brought up earlier. In the standalone client I ran into trouble discerning these blank windows from *but more knowledgeable eyes should double check and/or test if possible |
I failed to fully read jlegewie's initial comment and didn't account for the zotero://select urls (got focused on the open-pdf urls that I most often encounter). I pushed a new commit that addresses this behavior. Sorry about that. |
Thanks for your work on this! Just as a clarification: |
Yea, I knew it wasn't part of the official protocol, but I too hope it'd be part of the solution - it only needs a simply regex addition to the fix for the |
Hello, I set up everything so that now can open zotero:// links from OneNote - the only problem is with empty window. Can please anyone tell where this file chrome/content/zotero/zoteroPane.js is located for editing? Win 7, Zotero FF. |
Thank you for the answer. I mean where it can be found on my local machine to edit? I am not a programmer so sorry if the question is a bit stupid :) |
..\zotero\zotero\chrome\content\zotero\zoteroPane.js |
Is there an update on this? Conveniently opening links from Onenote would still be absolutely awesome! |
How to open a collection through Zotero link? "zotero://select/collections/9" doesn't work. |
I use zotfile to extract annotations to a note and then generate a report from it. I have successfully set Zotero 5 to open the links with pdf-tools. I usually save the report as an html file. However, when I try to open zotero links in the saved html file, an empty browser window is opened. Anyone has the same issue? How can I open links in a saved html report with specific application? |
This issue appears to be fixed on Windows 10 and macOS High Sierra with the current Zotero 5 beta. |
Hi,
when I open a zotero link from a note in Standalone such as
<a href="zotero://select/items/0_PZJQAHCA">test</a>
Zotero first opens an empty window and then selects the Zotero item. Is there a way to prevent that?Here is a brief discussion about the issue. fbennett uses a hack in MLZ to circumvent the problem but maybe there is a better solution from the Zotero side.
The text was updated successfully, but these errors were encountered: