Skip to content

Commit 13922a4

Browse files
committed
Extend the automatic display of Fancybox to include YouTube and Vimeo video links.
1 parent 492d12f commit 13922a4

File tree

2 files changed

+4
-2
lines changed
  • ts/WoltLabSuite/Core/Component/Image
  • wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image

2 files changed

+4
-2
lines changed

ts/WoltLabSuite/Core/Component/Image/Viewer.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ import { ConsentPlugin } from "./Fancybox/ConsentPlugin";
1212
setDefaultConfig();
1313

1414
export function setup() {
15-
Fancybox.bind('[data-fancybox]:is([data-type="image"],[data-type="video"])');
15+
Fancybox.bind(
16+
'[data-fancybox]:is([data-type="image"],[data-type="youtube"],[data-type="vimeo"],[data-type="video"])',
17+
);
1618
}
1719

1820
export function setupLegacy() {

wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)