diff options
author | Marco Nassabain <marco.nassabain@hotmail.com> | 2021-03-20 20:26:39 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-04-08 23:17:31 +0200 |
commit | 7be636f26a4cd2857035d7d07cdf111c442566b5 (patch) | |
tree | 08ff3ad758545b74c7aa8215cb8704f09e0ef86b /js | |
parent | 4e9875d5c60afd43240e274865c731d488f3ce31 (diff) |
💄 Hide social media sharing if apps disabled
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'js')
-rw-r--r-- | js/controller/ShareController.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/js/controller/ShareController.js b/js/controller/ShareController.js index 3289edf6a..8df57c5d0 100644 --- a/js/controller/ShareController.js +++ b/js/controller/ShareController.js @@ -168,6 +168,11 @@ app.controller('ShareController', function (ShareResource, Loading) { return app in OC.appswebroots; }; + this.isAnySocialAppEnabled = function() { + let media = ['facebook', 'twitter', 'email']; + return media.some(m => this.isSocialAppEnabled(m)); + }; + this.getFacebookUrl = function(url){ return 'https://www.facebook.com/sharer/sharer.php?u='+url; }; |