From ae0d50d99e3e1090af0b8018285d17e95cb3ab18 Mon Sep 17 00:00:00 2001 From: undefined Date: Mon, 5 Jul 2021 15:59:45 +0800 Subject: [PATCH] =?UTF-8?q?ui:=20=E4=BF=AE=E5=A4=8Dmarkdown=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui-default/backendlib/markdown-it-media.js | 9 +++++---- packages/ui-default/package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/ui-default/backendlib/markdown-it-media.js b/packages/ui-default/backendlib/markdown-it-media.js index 4edc2dc10..ba77ce744 100644 --- a/packages/ui-default/backendlib/markdown-it-media.js +++ b/packages/ui-default/backendlib/markdown-it-media.js @@ -86,13 +86,14 @@ function videoUrl(service, videoID, url, options) { case 'osf': return `https://mfr.osf.io/render?url=https://osf.io/${videoID}/?action=download`; default: - return service; + return videoID; } } module.exports = function videoPlugin(md) { const options = { url: videoUrl, + video: videoUrl, youtube: { width: 640, height: 390, nocookie: false }, vimeo: { width: 500, height: 281 }, vine: { width: 600, height: 600, embed: 'simple' }, @@ -118,9 +119,9 @@ module.exports = function videoPlugin(md) { + ' }); '; } if (service === 'pdf') return ``; - if (service === 'video') { - return `
`; } diff --git a/packages/ui-default/package.json b/packages/ui-default/package.json index a4a1cfbed..b8960042c 100644 --- a/packages/ui-default/package.json +++ b/packages/ui-default/package.json @@ -1,6 +1,6 @@ { "name": "@hydrooj/ui-default", - "version": "4.12.13", + "version": "4.12.14", "author": "undefined ", "license": "AGPL-3.0", "main": "hydro.js",