Skip to content

Commit

Permalink
webview: Open inline videos as links, just like YouTube previews
Browse files Browse the repository at this point in the history
Fixes-partly: #5781
  • Loading branch information
gnprice authored and chrisbobbe committed Nov 15, 2023
1 parent b2919cd commit b13ac96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/webview/js/generatedEs3.js
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ var compiledWebviewJs = (function (exports) {
return;
}
const inlineImageLink = target.closest('.message_inline_image a');
if (inlineImageLink && !inlineImageLink.closest('.youtube-video, .vimeo-video')) {
if (inlineImageLink && !inlineImageLink.closest('.message_inline_video, .youtube-video, .vimeo-video')) {
sendMessage({
type: 'image',
src: requireAttribute(inlineImageLink, 'href'),
Expand Down
2 changes: 1 addition & 1 deletion src/webview/js/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ documentBody.addEventListener('click', (e: MouseEvent) => {
inlineImageLink
/* The web app displays certain videos inline, but on mobile
* we'd rather let another app handle them, as links. */
&& !inlineImageLink.closest('.youtube-video, .vimeo-video')
&& !inlineImageLink.closest('.message_inline_video, .youtube-video, .vimeo-video')
) {
sendMessage({
type: 'image',
Expand Down

0 comments on commit b13ac96

Please sign in to comment.