From: Jakobus Schürz Date: Tue, 2 May 2023 08:31:43 +0000 (+0200) Subject: change test for navigator.share - fixes #13054 X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2294d6ffc3e58a5a426c9ba3d5f0878218f00fd6;p=friendica.git change test for navigator.share - fixes #13054 this testing for navigator.share is recommended from mozilla. tested with firefox linux, android and vivaldi on linux. --- diff --git a/view/theme/frio/js/theme.js b/view/theme/frio/js/theme.js index 60aa88ba58..1659758748 100644 --- a/view/theme/frio/js/theme.js +++ b/view/theme/frio/js/theme.js @@ -445,7 +445,9 @@ $(document).ready(function () { }); }); - if (!navigator.canShare || !navigator.canShare()) { + try { + navigator.canShare({ url: "#", }); + } catch(err) { $('.button-browser-share').hide(); } });