fix(setting): update PDF and EPUB viewer URLs (#297)

- Change PDF.js viewer URL from protocol-relative to HTTPS and updates parameter from "url" to "file" for proper document loading
- Also standardize EPUB.js viewer to use HTTPS protocol for consistency
This commit is contained in:
Xi Xu
2025-06-23 11:32:22 +08:00
committed by GitHub
parent 64dd3cb047
commit 49213c1321

View File

@ -125,10 +125,10 @@ func InitialSettings() []model.SettingItem {
"Google":"https://docs.google.com/gview?url=$e_url&embedded=true"
},
"pdf": {
"PDF.js":"//res.oplist.org/pdf.js/web/viewer.html?url=$e_url"
"PDF.js":"https://res.oplist.org/pdf.js/web/viewer.html?file=$e_url"
},
"epub": {
"EPUB.js":"//res.oplist.org/epub.js/viewer.html?url=$e_url"
"EPUB.js":"https://res.oplist.org/epub.js/viewer.html?url=$e_url"
}
}`, Type: conf.TypeText, Group: model.PREVIEW},
// {Key: conf.OfficeViewers, Value: `{