Simplify page path component parsing for zotero://open-pdf
This commit is contained in:
parent
60e0d79e01
commit
040e0a726a
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue