diff --git a/article_content.html b/article_content.html
index 55cd632..362a62f 100644
--- a/article_content.html
+++ b/article_content.html
@@ -3,6 +3,7 @@
{if="$creator"}{$creator} - {/if}{function="date('H:i Y-m-d', $value->getPubdate())"}
{function="Plugin::callHook("event_post_top_options", array(&$value))"}
+
{$value->getContent()}
diff --git a/js/script.js b/js/script.js
index b106e42..c765e6b 100644
--- a/js/script.js
+++ b/js/script.js
@@ -146,6 +146,14 @@ function _t (key, args) {
addListeners();
})();
+const shareButtonAction = async (title, url) => {
+ const shareData = {
+ title,
+ url
+ };
+ await navigator.share(shareData);
+};
+
$(function () {
'use strict';
@@ -470,13 +478,18 @@ function refreshEvents (syncCode) {
function getBubblingTarget (current, targetClass) {
const parentEl = current.parents('.' + targetClass);
return parentEl.length === 1
- ? parentEl : current;
+ ? parentEl
+ : current;
}
function EventObject (event) {
'use strict';
this.target = $(event.target);
+ if (typeof event.target.dataset.shareTitle === 'string' && event.target.dataset.shareTitle.length > 0) {
+ shareButtonAction(event.target.dataset.shareTitle, event.target.dataset.shareUrl);
+ }
+
this.entry = $(event.currentTarget);
this.content = this.entry.find('.' + this.contentClass);
diff --git a/locale/en.json b/locale/en.json
index 90707f9..3b15d2b 100644
--- a/locale/en.json
+++ b/locale/en.json
@@ -18,6 +18,7 @@
"LEEDVIBES_NO_MORE_EVENT": "The last item has already been shown.",
"LEEDVIBES_NO_NEW_EVENTS": "There is no new events since the last time.",
"LEEDVIBES_READ_ALL_CONFIRM": "Mark all events as read?",
+ "LEEDVIBES_SHARE": "Share",
"LEEDVIBES_SHORTCUTS_BUTTON_TITLE": "Shortcut list",
"LEEDVIBES_SHORTCUTS_ICON": "Shortcuts icon",
"LEEDVIBES_UNREAD": "unread",
diff --git a/locale/fr.json b/locale/fr.json
index 12cdc8a..92fa176 100644
--- a/locale/fr.json
+++ b/locale/fr.json
@@ -18,6 +18,7 @@
"LEEDVIBES_NO_MORE_EVENT": "La dernière entrée est déjà affichée.",
"LEEDVIBES_NO_NEW_EVENTS": "Aucun nouvel article n'est disponible.",
"LEEDVIBES_READ_ALL_CONFIRM": "Marquer toutes les entrées comme lues ?",
+ "LEEDVIBES_SHARE": "Partager",
"LEEDVIBES_SHORTCUTS_BUTTON_TITLE": "Liste des raccourcis",
"LEEDVIBES_SHORTCUTS_ICON": "Icone des raccourcis",
"LEEDVIBES_UNREAD": "non lu",