highlight-share
Version:
Medium-like text selection sharing without dependencies
1 lines • 1.44 kB
JavaScript
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.HighlightShareViaFacebookMessenger=e.HighlightShareViaFacebookMessenger||{})}(this,function(e){"use strict";function n(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}var t=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),r="facebook-messenger",o=function(){function e(t){n(this,e),this.appId=t,this.name=r}return t(e,[{key:"render",value:function(e,n,t){return'<a href="'+this.getShareUrl("",t)+'" target="_blank" rel="noopener nofollow noreferrer"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><g><path d="M16 6C9.925 6 5 10.56 5 16.185c0 3.205 1.6 6.065 4.1 7.932V28l3.745-2.056c1 .277 2.058.426 3.155.426 6.075 0 11-4.56 11-10.185C27 10.56 22.075 6 16 6zm1.093 13.716l-2.8-2.988-5.467 2.988 6.013-6.383 2.868 2.988 5.398-2.987-6.013 6.383z" fill-rule="evenodd"></path></g></svg></a>'}},{key:"getShareUrl",value:function(e,n){return"http://www.facebook.com/dialog/send?app_id="+this.appId+"&link="+n+"&redirect_uri="+n}}]),e}();e.name=r,e.FacebookMessenger=o,Object.defineProperty(e,"__esModule",{value:!0})});