Add support for marginnoteapp:// URI protocol (#1567)

https://forums.zotero.org/discussion/comment/316070/#Comment_316070
This commit is contained in:
Maecenas Li 2018-09-08 18:01:02 +08:00 committed by Dan Stillman
parent d8b2d24524
commit dd9ee66212

View file

@ -606,9 +606,10 @@ Zotero.Attachments = new function(){
Kindle (kindle://)
Logos (logosres:)
Bear (bear://)
MarginNote (marginnoteapp://)
Zotero (zotero://) */
var urlRe = /^((https?|zotero|evernote|onenote|brain|nv|mlo|kindle|x-devonthink-item|bear|ftp):\/\/|logosres:)[^\s]*$/;
var urlRe = /^((https?|zotero|evernote|onenote|brain|nv|mlo|kindle|x-devonthink-item|bear|marginnoteapp|ftp):\/\/|logosres:)[^\s]*$/;
var matches = urlRe.exec(url);
if (!matches) {
throw ("Invalid URL '" + url + "' in Zotero.Attachments.linkFromURL()");