]> git.mxchange.org Git - friendica.git/commitdiff
change test for navigator.share - fixes #13054
authorJakobus Schürz <jakobus.schuerz@home.arpa>
Tue, 2 May 2023 08:31:43 +0000 (10:31 +0200)
committerJakobus Schürz <jakobus.schuerz@home.arpa>
Tue, 2 May 2023 08:31:43 +0000 (10:31 +0200)
this testing for navigator.share is recommended from mozilla.
tested with firefox linux, android and vivaldi on linux.

view/theme/frio/js/theme.js

index 60aa88ba581bd23c73f20a496a19766c42303012..1659758748072784456f4d753408978c466fd9b9 100644 (file)
@@ -445,7 +445,9 @@ $(document).ready(function () {
                        });
        });
 
-       if (!navigator.canShare || !navigator.canShare()) {
+       try {
+               navigator.canShare({ url: "#", });
+       } catch(err) {
                $('.button-browser-share').hide();
        }
 });