-
Notifications
You must be signed in to change notification settings - Fork 0
/
ws.min.js
2 lines (2 loc) · 1.68 KB
/
ws.min.js
1
2
(function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='',b(b.s=0)})([function(){(function(a){if(!navigator.share)return console.warn('Web Share API is not available'),!1;let b={};const c=`<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none"/><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z"/></svg>`;b.attach=(a)=>{if('undefined'==typeof a||'undefined'==typeof a.target)return;const b=document.querySelector(a.target),d=document.createElement('p'),e=a.cb;let f=document.location.href;const g=document.querySelector('link[rel=canonical]');if(void 0!==g&&(f=g.href),d.id='__ws__share','object'==typeof a.style)try{d.style=JSON.stringify(a.style).replace(/({|}|\")/g,'').replace(/,/g,';')}catch(a){return void console.error(a)}d.innerHTML=c,d.addEventListener('click',function(){'function'==typeof e&&e(),navigator.share({url:f})}),b.appendChild(d)},a.__web_share__=b})(window)}]);
//# sourceMappingURL=ws.min.js.map