diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-06-19 21:04:36 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-06-19 21:04:36 +0200 |
commit | ee24664ee9b5e85058592e64cd65c391146cc55f (patch) | |
tree | 56621837f431f1367e8a9f4e77b1960479f003f7 /public/static/js/travelynx-actions.js | |
parent | da2511f8ba97516f372ffdf8ce7283097eb2c08a (diff) |
make share button link to status page if share API is unavailable
Diffstat (limited to 'public/static/js/travelynx-actions.js')
-rw-r--r-- | public/static/js/travelynx-actions.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/public/static/js/travelynx-actions.js b/public/static/js/travelynx-actions.js index deb010a..0df6989 100644 --- a/public/static/js/travelynx-actions.js +++ b/public/static/js/travelynx-actions.js @@ -148,9 +148,11 @@ function tvly_reg_handlers() { shareObj['url'] = $(this).data('url'); } navigator.share(shareObj); + } else if ($(this).data('url')) { + location.href = $(this).data('url'); } }); - if ($('.action-share').length && !navigator.share) { + if ($('.action-share').length && !navigator.share && !$('.action-share').data('url')) { $('.action-share').css('display', 'none'); } } |