From 040e0a726a0f9b0b4c79bf9355518b5e254a82a6 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 5 May 2018 01:30:18 -0400 Subject: [PATCH] Simplify page path component parsing for zotero://open-pdf --- components/zotero-protocol-handler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/zotero-protocol-handler.js b/components/zotero-protocol-handler.js index 934ba6c66..2740cb5cc 100644 --- a/components/zotero-protocol-handler.js +++ b/components/zotero-protocol-handler.js @@ -1036,7 +1036,7 @@ function ZoteroProtocolHandler() { router.add('groups/:groupID/items/:objectKey'); // ZotFile URLs - router.add(':id/:pathPage', function () { + router.add(':id/:page', function () { var lkh = Zotero.Items.parseLibraryKeyHash(params.id); if (!lkh) { Zotero.warn(`Invalid URL ${url}`); @@ -1050,7 +1050,7 @@ function ZoteroProtocolHandler() { Zotero.API.parseParams(params); var results = await Zotero.API.getResultsFromParams(params); - var page = params.pathPage || params.page; + var page = params.page; if (parseInt(page) != page) { page = null; }