From de79f1994717f0abd26f344a0b6133ce69a53a1f Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Fri, 17 Jul 2020 23:31:01 +0200 Subject: [PATCH] Revert "UX: Style video elements, show descriptions (#10040)" (#10258) This reverts commit 7d289a4f3e9531a0c7e458a52af85d0ae5affab9. Now that 36bad0c31f6fb1afce2d311b72f5f9661be6af97 is in and we have video previews on all platforms, the commit that's being reverted is no longer needed. In the worst case scenario, the video description is clipped under the video poster if the video aspect ratio is other than 16:9. This commit removes descriptions and the custom style for the video elements. # Conflicts: # app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js # test/javascripts/lib/pretty-text-test.js --- .../pretty-text/addon/engines/discourse-markdown-it.js | 8 ++------ app/assets/javascripts/pretty-text/addon/white-lister.js | 1 - app/assets/stylesheets/common/base/onebox.scss | 9 --------- test/javascripts/lib/pretty-text-test.js | 2 -- 4 files changed, 2 insertions(+), 18 deletions(-) diff --git a/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js b/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js index 3454994cecb..1a5f50a6dea 100644 --- a/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js +++ b/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js @@ -141,12 +141,11 @@ export function extractDataAttribute(str) { // videoHTML and audioHTML follow the same HTML syntax // as oneboxer.rb when dealing with these formats -function videoHTML(token, opts) { +function videoHTML(token) { const src = token.attrGet("src"); const origSrc = token.attrGet("data-orig-src"); const dataOrigSrcAttr = origSrc !== null ? `data-orig-src="${origSrc}"` : ""; return `
-

${opts.alt}