Fix zotero://open-pdf links with page for PDF Expert

https://forums.zotero.org/discussion/comment/365610/#Comment_365610
This commit is contained in:
Dan Stillman 2020-10-04 18:04:40 -04:00
parent 328865299b
commit 987b9ce4cb

View file

@ -23,6 +23,8 @@
***** END LICENSE BLOCK *****
*/
/* eslint-disable array-element-newline */
Zotero.OpenPDF = {
openToPage: async function (path, page) {
var handler = Zotero.Prefs.get("fileHandler.pdf");
@ -193,7 +195,7 @@ Zotero.OpenPDF = {
},
_openWithPDFExpert: async function (appPath, filePath, page) {
await Zotero.Utilities.Internal.exec('/usr/bin/open', ['-a', handlers, filePath]);
await Zotero.Utilities.Internal.exec('/usr/bin/open', ['-a', appPath, filePath]);
// Go to page using AppleScript (same as Preview)
let args = [
'-e', `tell app "${appPath}" to activate`,