ui: richmedia: add msoffice support

pull/392/head
undefined 2 years ago
parent 4fab4dc275
commit 3789a4fd6c

@ -124,6 +124,12 @@ export function Media(md: MarkdownIt) {
scrolling="no" border="0" frameborder="no" framespacing="0" width="100%" style="min-height:500px" ${allowFullScreen}></iframe>
`;
}
if (service === 'msoffice') {
return `\
<iframe src="https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(src)}"
scrolling="no" border="0" frameborder="no" framespacing="0" width="100%" style="min-height:500px" ${allowFullScreen}></iframe>
`;
}
if (service === 'pdf') {
if (src.startsWith('file://')) src += src.includes('?') ? '&noDisposition=1' : '?noDisposition=1';
return `\

@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.38.18",
"version": "4.38.19",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",

Loading…
Cancel
Save