summaryrefslogtreecommitdiff
path: root/public/static/js/travelynx-actions.js
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-06-19 21:04:36 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-06-19 21:04:36 +0200
commitee24664ee9b5e85058592e64cd65c391146cc55f (patch)
tree56621837f431f1367e8a9f4e77b1960479f003f7 /public/static/js/travelynx-actions.js
parentda2511f8ba97516f372ffdf8ce7283097eb2c08a (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.js4
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');
}
}