diff --git a/src/main/core/pdf.js b/src/main/core/pdf.js index 59190810..d2ee4180 100644 --- a/src/main/core/pdf.js +++ b/src/main/core/pdf.js @@ -16,7 +16,11 @@ const invoke = async () => { try { response = await fetch(location.href); } catch (e) { - updateRibbon(e.message, [""]); + if (location.href.startsWith("file://")) { + updateRibbon(res("cannotFetchLocalPdf"), [""]); + } else { + updateRibbon(e.message, [""]); + } return; } diff --git a/src/main/core/resource.js b/src/main/core/resource.js index a046819c..a535d11b 100644 --- a/src/main/core/resource.js +++ b/src/main/core/resource.js @@ -15,6 +15,8 @@ const resources = { downloadingPdf: "📘ダウンロード中...", preparingPdf: "📘PDFビューア準備中...", nonPdf: "PDFファイルではないようです。処理を中断しました。", + cannotFetchLocalPdf: + "⛔Mouse DictionaryはローカルにあるPDFファイル上では起動できません。オプション画面から開けるPDFビューアをご利用ください。", }, en: { continueProcessingPdf: @@ -23,6 +25,7 @@ const resources = { downloadingPdf: "📘Downloading...", preparingPdf: "📘Preparing PDF viewer...", nonPdf: "This is not a PDF document.", + cannotFetchLocalPdf: "⛔Mouse Dictionary can't launch on local PDFs. Use the PDF viewer from the options screen.", }, };