Zotero URI vs. select item
Hello,
the following two are the same item:
http://zotero.org/groups/2339240/items/9FNQ8D8G
zotero://select/items/5568133_9FNQ8D8G
Would somebody be able to remind me how the library ids (2339240, 5568133) are related?
I would like to make a bookmarklet that uses http://zotero.org/groups/2339240/items/9FNQ8D8G
to open zotero://select/items/5568133_9FNQ8D8G.
However, if the numbers aren't related (or the latter is a local number), then it won't work.
Many thanks!
Bjoern
the following two are the same item:
http://zotero.org/groups/2339240/items/9FNQ8D8G
zotero://select/items/5568133_9FNQ8D8G
Would somebody be able to remind me how the library ids (2339240, 5568133) are related?
I would like to make a bookmarklet that uses http://zotero.org/groups/2339240/items/9FNQ8D8G
to open zotero://select/items/5568133_9FNQ8D8G.
However, if the numbers aren't related (or the latter is a local number), then it won't work.
Many thanks!
Bjoern
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
Upgrade Storage
Many thanks for the help!
Bjoern
javascript:(function(){
var href = window.location.href;
var url = href.replace(/https?\:\/\/(www\.)?zotero\.org\//,"zotero://select/");
url = url.replace(/\/[^\/]+\/items\/(collection|item)Key/,"/$1s");
window.location.href = url;
})();
When on a zotero web-library page, it opens the corresponding item in Zotero. Works on items and collections. Not very robust - e.g. ought to display warning when not on a zotero page.
https://github.com/bjohas/zoteroSelectItem/blob/master/bookmarklet.js
(Zotero could theoretically allow zotero://select/users/12345/items/ABCD2345 to work if you've synced, but that doesn't happen now — instead if just uses a default path for My Library regardless of whether you've synced.)