diff options
author | Nicolas Wendling <nicolas.wendling1011@gmail.com> | 2021-03-17 22:42:26 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-04-08 23:17:31 +0200 |
commit | ffa476190f90bdc449f1dcc016836ba1a0bd5b38 (patch) | |
tree | 0ba18cd4c8143bca6fef77b24d14fa3c8e745aed /js | |
parent | 8c2603b93f43acf007be12c03ff8d0828bc0e533 (diff) |
♻️ use Share.getEmailUrl method to share an article via an email.
Signed-off-by: Nicolas Wendling <nicolas.wendling1011@gmail.com>
Diffstat (limited to 'js')
-rw-r--r-- | js/controller/ShareController.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/js/controller/ShareController.js b/js/controller/ShareController.js index eb056ce19..e1255e92a 100644 --- a/js/controller/ShareController.js +++ b/js/controller/ShareController.js @@ -158,4 +158,8 @@ app.controller('ShareController', function (ShareResource, Loading) { this.getTwitterUrl = function(url){ return 'https://twitter.com/intent/tweet?url='+url; }; + + this.getEmailUrl = function(url, object, body){ + return encodeURI('mailto:?subject=' + object + '&body=' + body + ' ' + url); + }; }); |