新增markdown格式预览支持

This commit is contained in:
kl
2020-12-25 16:59:11 +08:00
committed by kl
parent cb21952155
commit cf1f833d60
9 changed files with 132 additions and 26 deletions

View File

@ -63,12 +63,12 @@
window.onscroll = throttle(checkImgs);
function changePreviewType(previewType) {
var url = window.location.href;
if (url.indexOf("officePreviewType=image") != -1) {
if (url.indexOf("officePreviewType=image") !== -1) {
url = url.replace("officePreviewType=image", "officePreviewType="+previewType);
} else {
url = url + "&officePreviewType="+previewType;
}
if ('allImages' == previewType) {
if ('allImages' === previewType) {
window.open(url)
} else {
window.location.href = url;