Skip to content

Commit

Permalink
Fix auto prepend file:// to offline doc path
Browse files Browse the repository at this point in the history
  • Loading branch information
Folyd committed Jun 23, 2024
1 parent 681e159 commit 1014055
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core
Submodule core updated 2 files
+1 −1 src/compat.js
+4 −2 src/render.js
2 changes: 1 addition & 1 deletion extension/manage/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ document.addEventListener('DOMContentLoaded', async function () {
// Replace all "/" to "\" for Windows.
path = event.target.value.replaceAll("/", "\\");
}
if (!path.startsWith("file://")) {
if (path.startsWith("/")) {
// Prepend file:// to allow browser open the file url
path = "file://" + path;
}
Expand Down

0 comments on commit 1014055

Please sign in to comment.