mirror of
https://github.com/zotero/zotero.git
synced 2026-10-04 02:31:47 +00:00
Merge 7639dce85f into d0507e02c8
This commit is contained in:
commit
4f90ccc9a5
1 changed files with 12 additions and 1 deletions
|
|
@ -283,7 +283,18 @@ Zotero.FileHandlers = {
|
|||
_handlersWin: {
|
||||
pdf: [
|
||||
{
|
||||
name: new RegExp(''), // Match any handler
|
||||
name: /chrome\.exe|msedge\.exe|firefox\.exe/i,
|
||||
async open(appPath, { filePath, page }) {
|
||||
let args = [Zotero.File.pathToFileURI(filePath)];
|
||||
if (page !== undefined) {
|
||||
// Chrome/Edge/Firefox uses URL fragment for page number
|
||||
args[0] += '#page=' + page;
|
||||
}
|
||||
await Zotero.FileHandlers._checkAndExecWithoutBlocking(appPath, args);
|
||||
}
|
||||
},
|
||||
{
|
||||
name: new RegExp(''), // Fallback for other handlers
|
||||
async open(appPath, { filePath, page }) {
|
||||
let args = [filePath];
|
||||
if (page !== undefined) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue