From c6d09e52709decbdc9366cd3885c876dc3643a73 Mon Sep 17 00:00:00 2001 From: Grischa Brockhaus Date: Mon, 5 Dec 2022 12:46:18 +0100 Subject: [PATCH] Changes added because of good remarks by hypolite@friendica.mrpetovan.com --- fancybox/asset/fancybox/fancybox.config.js | 1 + fancybox/fancybox.php | 56 +++++++++------------- 2 files changed, 24 insertions(+), 33 deletions(-) diff --git a/fancybox/asset/fancybox/fancybox.config.js b/fancybox/asset/fancybox/fancybox.config.js index 6ac5d9c55..2b9c4f418 100644 --- a/fancybox/asset/fancybox/fancybox.config.js +++ b/fancybox/asset/fancybox/fancybox.config.js @@ -1,4 +1,5 @@ $(document).ready(function() { $.fancybox.defaults.loop = "true"; + // this disables the colorbox hook found in frio/js/modal.js:34 $("body").off("click", ".wall-item-body a img"); }); \ No newline at end of file diff --git a/fancybox/fancybox.php b/fancybox/fancybox.php index 1400a75c6..43219103b 100644 --- a/fancybox/fancybox.php +++ b/fancybox/fancybox.php @@ -28,43 +28,33 @@ function fancybox_footer(App $a, string &$str) DI::page()->registerFooterScript(__DIR__ . '/asset/fancybox/fancybox.config.js'); } -function fancybox_render($a, array &$b){ +function fancybox_render(App $a, array &$b){ $gallery = 'gallery-' . $b['item']['uri-id'] ?? random_int(1000000, 10000000); - // prevent urls in #s', - function ($matches) use ($gallery) { - return str_replace('