From 79504df5f8ec3fba3da072ffa683f08030f2d3cc Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 12 Apr 2016 18:59:46 -0400 Subject: [PATCH] Remove "/report.html" in report URLs Firefox saves as Zotero Report.html (localized) without it, which is fine. --- chrome/content/zotero/reportInterface.js | 4 ++-- components/zotero-protocol-handler.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/chrome/content/zotero/reportInterface.js b/chrome/content/zotero/reportInterface.js index 9144d16a1..16147af0e 100644 --- a/chrome/content/zotero/reportInterface.js +++ b/chrome/content/zotero/reportInterface.js @@ -53,7 +53,7 @@ var Zotero_Report_Interface = new function() { url += 'searches/' + source.key; } - url += '/items/report.html' + queryString; + url += '/items' + queryString; ZoteroPane_Local.loadURI(url, event); } @@ -70,7 +70,7 @@ var Zotero_Report_Interface = new function() { throw new Error('No items currently selected'); } - var url = 'zotero://report/' + Zotero.API.getLibraryPrefix(libraryID) + '/items/report.html' + var url = 'zotero://report/' + Zotero.API.getLibraryPrefix(libraryID) + '/items' + '?itemKey=' + items.map(item => item.key).join(','); ZoteroPane_Local.loadURI(url, event); } diff --git a/components/zotero-protocol-handler.js b/components/zotero-protocol-handler.js index 36c3d16d5..7118b1c12 100644 --- a/components/zotero-protocol-handler.js +++ b/components/zotero-protocol-handler.js @@ -119,16 +119,16 @@ function ZoteroProtocolHandler() { var router = new Zotero.Router(params); // Items within a collection or search - router.add('library/:scopeObject/:scopeObjectKey/items/report.html', function () { + router.add('library/:scopeObject/:scopeObjectKey/items', function () { params.libraryID = userLibraryID; }); - router.add('groups/:groupID/:scopeObject/:scopeObjectKey/items/report.html'); + router.add('groups/:groupID/:scopeObject/:scopeObjectKey/items'); // All items - router.add('library/items/report.html', function () { + router.add('library/items', function () { params.libraryID = userLibraryID; }); - router.add('groups/:groupID/items/report.html'); + router.add('groups/:groupID/items'); // Old-style URLs router.add('collection/:id/html/report.html', function () {