Add support for bear:// URI protocol (#1520)

https://forums.zotero.org/discussion/comment/310717#Comment_310717
This commit is contained in:
Brenton M. Wiernik 2018-06-29 02:27:19 +02:00 committed by Dan Stillman
parent 5425c272b2
commit b4ee2fbd98

View file

@ -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()");