Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
Make text of Zotero links customizable
Browse files Browse the repository at this point in the history
  • Loading branch information
argenos committed Mar 27, 2021
1 parent 6b9b5d6 commit ce170ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions content/mdnotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ function getCiteKey(item) {
}

function getLocalZoteroLink(item) {
let linksString = "[Local library](zotero://select/items/";
let linksString = "zotero://select/items/";
const library_id = item.libraryID ? item.libraryID : 0;
linksString += `${library_id}_${item.key})`;
linksString += `${library_id}_${item.key}`;

return linksString;
}

function getCloudZoteroLink(item) {
return `[Cloud library](${Zotero.URI.getItemURI(item)})`;
return `${Zotero.URI.getItemURI(item)}`;
}

function getDOI(item) {
Expand Down
4 changes: 2 additions & 2 deletions defaults/preferences/mdnotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ pref("extensions.mdnotes.placeholder.citekey", '{"content":"{{bullet}} Cite key:
pref("extensions.mdnotes.placeholder.pdfAttachments", '{"content":"{{bullet}} PDF Attachments\\n\\t- {{field_contents}}", "field_contents": "{{content}}", "list_separator": "\\n\\t- "}');
pref("extensions.mdnotes.placeholder.url", '{"content":"{{bullet}} URL: {{field_contents}}", "field_contents": "{{content}}"}');
pref("extensions.mdnotes.placeholder.DOI", '{"content":"{{bullet}} DOI: {{field_contents}}", "field_contents": "{{content}}", "link_style": "no-links"}');
pref("extensions.mdnotes.placeholder.cloudLibrary", '{"content":"{{bullet}} {{field_contents}}"}');
pref("extensions.mdnotes.placeholder.localLibrary", '{"content":"{{bullet}} {{field_contents}}"}');
pref("extensions.mdnotes.placeholder.cloudLibrary", '{"content":"{{bullet}} {{field_contents}}", "field_contents": "\[Cloud library\]({{content}})"}');
pref("extensions.mdnotes.placeholder.localLibrary", '{"content":"{{bullet}} {{field_contents}}", "field_contents": "\[Local library\]({{content}})"}');
pref("extensions.mdnotes.placeholder.noteContent", '{"content":"{{field_contents}}"}');

pref("extensions.mdnotes.templates.directory", "");
Expand Down

0 comments on commit ce170ae

Please sign in to comment.