From b4ee2fbd9818f95520cc456e5b247deb6b3a304b Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Fri, 29 Jun 2018 02:27:19 +0200 Subject: [PATCH] Add support for bear:// URI protocol (#1520) https://forums.zotero.org/discussion/comment/310717#Comment_310717 --- chrome/content/zotero/xpcom/attachments.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js index 075463ca09..2b2099a232 100644 --- a/chrome/content/zotero/xpcom/attachments.js +++ b/chrome/content/zotero/xpcom/attachments.js @@ -539,9 +539,10 @@ Zotero.Attachments = new function(){ OneNote (onenote://) Kindle (kindle://) Logos (logosres:) + Bear (bear://) Zotero (zotero://) */ - var urlRe = /^((https?|zotero|evernote|onenote|brain|nv|mlo|kindle|x-devonthink-item|ftp):\/\/|logosres:)[^\s]*$/; + var urlRe = /^((https?|zotero|evernote|onenote|brain|nv|mlo|kindle|x-devonthink-item|bear|ftp):\/\/|logosres:)[^\s]*$/; var matches = urlRe.exec(url); if (!matches) { throw ("Invalid URL '" + url + "' in Zotero.Attachments.linkFromURL()");