esport default mailgo
This commit is contained in:
1 parent
83472abeee
commit
b5000f476f
3 files changed
+20
-21
No files matched your search
Vendored
+1
-1
@@ -1 +1 @@
|
||||
"use strict";var mailgoVersion="0.9.0";!function(){function t(){var e=ee();e.style.display="none",e.id="mailgo",e.classList.add("m-modal");var t=ee();t.className="m-modal-back",e.appendChild(t);var a=ee();a.className="m-modal-content",e.appendChild(a),(w=ee("strong")).id="m-title",w.className="m-title",a.appendChild(w);var o=ee();o.id="m-details",o.className="m-details",(v=ee("p")).id="m-cc";var n=ee(_);n.className="w-500",n.appendChild(te("cc ")),(L=ee(_)).id="m-cc-value",v.appendChild(n),v.appendChild(L),o.appendChild(v),(C=ee("p")).id="m-bcc";var i=ee(_);i.className="w-500",i.appendChild(te("bcc ")),(z=ee(_)).id="m-bcc-value",C.appendChild(i),C.appendChild(z),o.appendChild(C),(y=ee("p")).id="m-subject";var d=ee(_);d.className="w-500",d.appendChild(te("subject ")),(A=ee(_)).id="m-subject-value",y.appendChild(d),y.appendChild(A),o.appendChild(y),(k=ee("p")).id="m-body";var l=ee(_);l.className="w-500",l.appendChild(te("body ")),(E=ee(_)).id="m-body-value",k.appendChild(l),k.appendChild(E),o.appendChild(k),a.appendChild(o),(N=ee("a")).id="m-gmail",N.href=H,N.classList.add("m-open"),N.classList.add("m-gmail"),N.appendChild(te("open in "));var s=ee(_);s.className="w-500",s.appendChild(te("Gmail")),N.appendChild(s),a.appendChild(N),(j=ee("a")).id="m-outlook",j.href=H,j.classList.add("m-open"),j.classList.add("m-outlook"),j.appendChild(te("open in "));var c=ee(_);c.className="w-500",c.appendChild(te("Outlook")),j.appendChild(c),a.appendChild(j),(R=ee("a")).id="m-open",R.href=H,R.classList.add("m-open"),R.classList.add("m-default");var r=ee(_);r.className="w-500",r.appendChild(te("open")),R.appendChild(r),R.appendChild(te(" default")),a.appendChild(R),(M=ee("a")).id="m-copy",M.href=H,M.classList.add("m-copy"),M.classList.add("w-500"),M.appendChild(te("copy")),a.appendChild(M),a.appendChild(Y()),document.body.appendChild(e),t.addEventListener("click",Q);var m=ee();m.style.display="none",m.id="mailgo-tel",m.classList.add("m-modal");var p=ee();p.className="m-modal-back",m.appendChild(p);var b=ee();b.className="m-modal-content",m.appendChild(b),(x=ee("strong")).id="m-tel-title",x.className="m-title",b.appendChild(x),(U=ee("a")).id="m-tg",U.href=H,U.classList.add("m-open"),U.classList.add("m-tg"),U.style.display="none",U.appendChild(te("open in "));var h=ee(_);h.className="w-500",h.appendChild(te("Telegram")),U.appendChild(h),b.appendChild(U),(I=ee("a")).id="m-wa",I.href=H,I.classList.add("m-open"),I.classList.add("m-wa"),I.appendChild(te("open in "));var u=ee(_);u.className="w-500",u.appendChild(te("WhatsApp")),I.appendChild(u),b.appendChild(I),(S=ee("a")).id="m-skype",S.href=H,S.classList.add("m-open"),S.classList.add("m-skype"),S.appendChild(te("open in "));var g=ee(_);g.className="w-500",g.appendChild(te("Skype")),S.appendChild(g),b.appendChild(S),(T=ee("a")).id="m-call",T.href=H,T.classList.add("m-open"),T.classList.add("m-default");var f=ee(_);f.className="w-500",f.appendChild(te("call")),T.appendChild(f),T.appendChild(te(" as default")),b.appendChild(T),(W=ee("a")).id="m-tel-copy",W.href=H,W.classList.add("m-copy"),W.classList.add("w-500"),W.appendChild(te("copy")),b.appendChild(W),b.appendChild(Y()),document.body.appendChild(m),p.addEventListener("click",Q)}function a(e,t){var a=0<arguments.length&&void 0!==e?e:c,o=1<arguments.length?t:void 0;if(a===c){if(o.href&&o.href.toLowerCase().startsWith(d)){m=decodeURIComponent(o.href.split("?")[0].split(d)[1].trim());var n=new URL(o.href).searchParams;b=n.get("cc"),h=n.get("bcc"),u=n.get("subject"),g=n.get("body")}else m=o.getAttribute("data-address")+"@"+o.getAttribute("data-domain"),new URL(d+encodeURIComponent(m)),b=o.getAttribute("data-cc-address")+"@"+o.getAttribute("data-cc-domain"),h=o.getAttribute("data-bcc-address")+"@"+o.getAttribute("data-bcc-domain"),u=o.getAttribute("data-subject"),g=o.getAttribute("data-body");if(!le(m.split(",")))return;b&&!le(b.split(","))&&(b=""),h&&!le(h.split(","))&&(h=""),w.innerHTML=m.split(",").join("<br/>"),b?(v.style.display="block",L.innerHTML=b.split(",").join("<br/>")):v.style.display="none",h?(C.style.display="block",z.innerHTML=h.split(",").join("<br/>")):C.style.display="none",u?(y.style.display="block",A.textContent=u):y.style.display="none",g?(k.style.display="block",E.textContent=g):k.style.display="none",N.addEventListener("click",B),j.addEventListener("click",O),p=ae(m),R.addEventListener("click",Z),M.addEventListener("click",function(){return q(m)})}a===r&&(o.href&&o.href.toLowerCase().startsWith(l)?f=decodeURIComponent(o.href.split("?")[0].split(l)[1].trim()):o.href&&o.href.toLowerCase().startsWith(s)?f=decodeURIComponent(o.href.split("?")[0].split(s)[1].trim()):o.hasAttribute("data-tel")&&(f=o.getAttribute("data-tel"),o.getAttribute("data-msg")),o.hasAttribute("data-telegram")&&(D=o.getAttribute("data-telegram")),o.hasAttribute("data-skype")&&(P=o.getAttribute("data-skype")),x.innerHTML=f,I.addEventListener("click",V),D&&(ie("m-tg","block"),U.addEventListener("click",F)),S.addEventListener("click",G),T.addEventLiLine truncated
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var mailgoVersion="0.9.0",startMailgo=function(){function e(){var e=ee();e.style.display="none",e.id="mailgo",e.classList.add("m-modal");var t=ee();t.className="m-modal-back",e.appendChild(t);var a=ee();a.className="m-modal-content",e.appendChild(a),(x=ee("strong")).id="m-title",x.className="m-title",a.appendChild(x);var o=ee();o.id="m-details",o.className="m-details",(v=ee("p")).id="m-cc";var n=ee(H);n.className="w-500",n.appendChild(te("cc ")),(L=ee(H)).id="m-cc-value",v.appendChild(n),v.appendChild(L),o.appendChild(v),(C=ee("p")).id="m-bcc";var i=ee(H);i.className="w-500",i.appendChild(te("bcc ")),(z=ee(H)).id="m-bcc-value",C.appendChild(i),C.appendChild(z),o.appendChild(C),(y=ee("p")).id="m-subject";var d=ee(H);d.className="w-500",d.appendChild(te("subject ")),(A=ee(H)).id="m-subject-value",y.appendChild(d),y.appendChild(A),o.appendChild(y),(k=ee("p")).id="m-body";var l=ee(H);l.className="w-500",l.appendChild(te("body ")),(E=ee(H)).id="m-body-value",k.appendChild(l),k.appendChild(E),o.appendChild(k),a.appendChild(o),(N=ee("a")).id="m-gmail",N.href=W,N.classList.add("m-open"),N.classList.add("m-gmail"),N.appendChild(te("open in "));var s=ee(H);s.className="w-500",s.appendChild(te("Gmail")),N.appendChild(s),a.appendChild(N),(j=ee("a")).id="m-outlook",j.href=W,j.classList.add("m-open"),j.classList.add("m-outlook"),j.appendChild(te("open in "));var c=ee(H);c.className="w-500",c.appendChild(te("Outlook")),j.appendChild(c),a.appendChild(j),(R=ee("a")).id="m-open",R.href=W,R.classList.add("m-open"),R.classList.add("m-default");var r=ee(H);r.className="w-500",r.appendChild(te("open")),R.appendChild(r),R.appendChild(te(" default")),a.appendChild(R),(_=ee("a")).id="m-copy",_.href=W,_.classList.add("m-copy"),_.classList.add("w-500"),_.appendChild(te("copy")),a.appendChild(_),a.appendChild(Y()),document.body.appendChild(e),t.addEventListener("click",Q);var m=ee();m.style.display="none",m.id="mailgo-tel",m.classList.add("m-modal");var p=ee();p.className="m-modal-back",m.appendChild(p);var b=ee();b.className="m-modal-content",m.appendChild(b),(w=ee("strong")).id="m-tel-title",w.className="m-title",b.appendChild(w),(U=ee("a")).id="m-tg",U.href=W,U.classList.add("m-open"),U.classList.add("m-tg"),U.style.display="none",U.appendChild(te("open in "));var u=ee(H);u.className="w-500",u.appendChild(te("Telegram")),U.appendChild(u),b.appendChild(U),(I=ee("a")).id="m-wa",I.href=W,I.classList.add("m-open"),I.classList.add("m-wa"),I.appendChild(te("open in "));var h=ee(H);h.className="w-500",h.appendChild(te("WhatsApp")),I.appendChild(h),b.appendChild(I),(M=ee("a")).id="m-skype",M.href=W,M.classList.add("m-open"),M.classList.add("m-skype"),M.appendChild(te("open in "));var g=ee(H);g.className="w-500",g.appendChild(te("Skype")),M.appendChild(g),b.appendChild(M),(S=ee("a")).id="m-call",S.href=W,S.classList.add("m-open"),S.classList.add("m-default");var f=ee(H);f.className="w-500",f.appendChild(te("call")),S.appendChild(f),S.appendChild(te(" as default")),b.appendChild(S),(T=ee("a")).id="m-tel-copy",T.href=W,T.classList.add("m-copy"),T.classList.add("w-500"),T.appendChild(te("copy")),b.appendChild(T),b.appendChild(Y()),document.body.appendChild(m),p.addEventListener("click",Q)}function a(e,t){var a=0<arguments.length&&void 0!==e?e:c,o=1<arguments.length?t:void 0;if(a===c){if(o.href&&o.href.toLowerCase().startsWith(d)){m=decodeURIComponent(o.href.split("?")[0].split(d)[1].trim());var n=new URL(o.href).searchParams;b=n.get("cc"),u=n.get("bcc"),h=n.get("subject"),g=n.get("body")}else m=o.getAttribute("data-address")+"@"+o.getAttribute("data-domain"),new URL(d+encodeURIComponent(m)),b=o.getAttribute("data-cc-address")+"@"+o.getAttribute("data-cc-domain"),u=o.getAttribute("data-bcc-address")+"@"+o.getAttribute("data-bcc-domain"),h=o.getAttribute("data-subject"),g=o.getAttribute("data-body");if(!se(m.split(",")))return;b&&!se(b.split(","))&&(b=""),u&&!se(u.split(","))&&(u=""),x.innerHTML=m.split(",").join("<br/>"),b?(v.style.display="block",L.innerHTML=b.split(",").join("<br/>")):v.style.display="none",u?(C.style.display="block",z.innerHTML=u.split(",").join("<br/>")):C.style.display="none",h?(y.style.display="block",A.textContent=h):y.style.display="none",g?(k.style.display="block",E.textContent=g):k.style.display="none",N.addEventListener("click",O),j.addEventListener("click",B),p=oe(m),R.addEventListener("click",Z),_.addEventListener("click",function(){return q(m)})}a===r&&(o.href&&o.href.toLowerCase().startsWith(l)?f=decodeURIComponent(o.href.split("?")[0].split(l)[1].trim()):o.href&&o.href.toLowerCase().startsWith(s)?f=decodeURIComponent(o.href.split("?")[0].split(s)[1].trim()):o.hasAttribute("data-tel")&&(f=o.getAttribute("data-tel"),o.getAttribute("data-msg")),o.hasAttribute("data-telegram")&&(D=o.getAttribute("data-telegram")),o.hasAttribute("data-skype")&&(P=o.getAttribute("data-skype")),w.innerHTML=f,I.addEventListener("click",V),D&&(de(Line truncated
|
||||
@@ -1 +1 @@
|
||||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.mailgo=t():e.mailgo=t()}(window,(function(){return function(e){var t={};function o(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=e,o.c=t,o.d=function(e,t,a){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(a,n,function(t){return e[t]}.bind(null,n));return a},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t,o){"use strict";!function(){function e(){var e=Y();e.style.display="none",e.id="mailgo",e.classList.add("m-modal");var t=Y();t.className="m-modal-back",e.appendChild(t);var o=Y();o.className="m-modal-content",e.appendChild(o),(i=Y("strong")).id="m-title",i.className="m-title",o.appendChild(i);var a=Y();a.id="m-details",a.className="m-details",(l=Y("p")).id="m-cc";var n=Y(S);n.className="w-500",n.appendChild(ee("cc ")),(m=Y(S)).id="m-cc-value",l.appendChild(n),l.appendChild(m),a.appendChild(l),(r=Y("p")).id="m-bcc";var L=Y(S);L.className="w-500",L.appendChild(ee("bcc ")),(p=Y(S)).id="m-bcc-value",r.appendChild(L),r.appendChild(p),a.appendChild(r),(c=Y("p")).id="m-subject";var z=Y(S);z.className="w-500",z.appendChild(ee("subject ")),(u=Y(S)).id="m-subject-value",c.appendChild(z),c.appendChild(u),a.appendChild(c),(s=Y("p")).id="m-body";var j=Y(S);j.className="w-500",j.appendChild(ee("body ")),(b=Y(S)).id="m-body-value",s.appendChild(j),s.appendChild(b),a.appendChild(s),o.appendChild(a),(f=Y("a")).id="m-gmail",f.href=N,f.classList.add("m-open"),f.classList.add("m-gmail"),f.appendChild(ee("open in "));var A=Y(S);A.className="w-500",A.appendChild(ee("Gmail")),f.appendChild(A),o.appendChild(f),(h=Y("a")).id="m-outlook",h.href=N,h.classList.add("m-open"),h.classList.add("m-outlook"),h.appendChild(ee("open in "));var E=Y(S);E.className="w-500",E.appendChild(ee("Outlook")),h.appendChild(E),o.appendChild(h),(g=Y("a")).id="m-open",g.href=N,g.classList.add("m-open"),g.classList.add("m-default");var R=Y(S);R.className="w-500",R.appendChild(ee("open")),g.appendChild(R),g.appendChild(ee(" default")),o.appendChild(g),(C=Y("a")).id="m-copy",C.href=N,C.classList.add("m-copy"),C.classList.add("w-500"),C.appendChild(ee("copy")),o.appendChild(C),o.appendChild(X()),document.body.appendChild(e),t.addEventListener("click",Q);var U=Y();U.style.display="none",U.id="mailgo-tel",U.classList.add("m-modal");var I=Y();I.className="m-modal-back",U.appendChild(I);var M=Y();M.className="m-modal-content",U.appendChild(M),(d=Y("strong")).id="m-tel-title",d.className="m-title",M.appendChild(d),(x=Y("a")).id="m-tg",x.href=N,x.classList.add("m-open"),x.classList.add("m-tg"),x.style.display="none",x.appendChild(ee("open in "));var _=Y(S);_.className="w-500",_.appendChild(ee("Telegram")),x.appendChild(_),M.appendChild(x),(v=Y("a")).id="m-wa",v.href=N,v.classList.add("m-open"),v.classList.add("m-wa"),v.appendChild(ee("open in "));var T=Y(S);T.className="w-500",T.appendChild(ee("WhatsApp")),v.appendChild(T),M.appendChild(v),(w=Y("a")).id="m-skype",w.href=N,w.classList.add("m-open"),w.classList.add("m-skype"),w.appendChild(ee("open in "));var O=Y(S);O.className="w-500",O.appendChild(ee("Skype")),w.appendChild(O),M.appendChild(w),(y=Y("a")).id="m-call",y.href=N,y.classList.add("m-open"),y.classList.add("m-default");var P=Y(S);P.className="w-500",P.appendChild(ee("call")),y.appendChild(P),y.appendChild(ee(" as default")),M.appendChild(y),(k=Y("a")).id="m-tel-copy",k.href=N,k.classList.add("m-copy"),k.classList.add("w-500"),k.appendChild(ee("copy")),M.appendChild(k),M.appendChild(X()),document.body.appendChild(U),I.addEventListener("click",Q)}function t(e,t){var o=0<arguments.length&&void 0!==e?e:A,a=1<arguments.length?t:void 0;if(o===A){if(a.href&&a.href.toLowerCase().startsWith(L)){R=decodeURIComponent(a.href.split("?")[0].split(L)[1].trim());var n=new URL(a.href).searchParams;I=n.get("cc"),M=n.get("bcc"),_=n.get("subject"),T=n.get("body")}else R=a.getAttribute("data-address")+"@"+a.getAttribute("data-domain"),new URL(L+encodeURIComponent(R)),I=a.getAttribute("data-cc-address")+"@"+a.getAttribute("data-cc-domain"),M=a.getAttribute("data-bcc-address")+"@"+a.getAttribute("data-bcc-domain"),_=a.getAttribute("data-subject"),T=a.getAttribute("data-body");if(!le(R.split(",")))return;I&&!le(I.split(","))&&(I=""),M&&!le(M.split(","Line truncated
|
||||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.mailgo=t():e.mailgo=t()}(window,(function(){return function(e){var t={};function o(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=e,o.c=t,o.d=function(e,t,a){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(a,n,function(t){return e[t]}.bind(null,n));return a},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(){function e(e,t){var o=0<arguments.length&&void 0!==e?e:j,C=1<arguments.length?t:void 0;if(o===j){if(C.href&&C.href.toLowerCase().startsWith(k)){S=decodeURIComponent(C.href.split("?")[0].split(k)[1].trim());var E=new URL(C.href).searchParams;_=E.get("cc"),M=E.get("bcc"),U=E.get("subject"),I=E.get("body")}else S=C.getAttribute("data-address")+"@"+C.getAttribute("data-domain"),new URL(k+encodeURIComponent(S)),_=C.getAttribute("data-cc-address")+"@"+C.getAttribute("data-cc-domain"),M=C.getAttribute("data-bcc-address")+"@"+C.getAttribute("data-bcc-domain"),U=C.getAttribute("data-subject"),I=C.getAttribute("data-body");if(!de(S.split(",")))return;_&&!de(_.split(","))&&(_=""),M&&!de(M.split(","))&&(M=""),a.innerHTML=S.split(",").join("<br/>"),_?(i.style.display="block",c.innerHTML=_.split(",").join("<br/>")):i.style.display="none",M?(d.style.display="block",s.innerHTML=M.split(",").join("<br/>")):d.style.display="none",U?(l.style.display="block",m.textContent=U):l.style.display="none",I?(r.style.display="block",p.textContent=I):r.style.display="none",u.addEventListener("click",W),b.addEventListener("click",H),R=te(S),f.addEventListener("click",D),w.addEventListener("click",(function(){return $(S)}))}o===A&&(C.href&&C.href.toLowerCase().startsWith(L)?T=decodeURIComponent(C.href.split("?")[0].split(L)[1].trim()):C.href&&C.href.toLowerCase().startsWith(z)?T=decodeURIComponent(C.href.split("?")[0].split(z)[1].trim()):C.hasAttribute("data-tel")&&(T=C.getAttribute("data-tel"),C.getAttribute("data-msg")),C.hasAttribute("data-telegram")&&(O=C.getAttribute("data-telegram")),C.hasAttribute("data-skype")&&(P=C.getAttribute("data-skype")),n.innerHTML=T,g.addEventListener("click",F),O&&(ne("m-tg","block"),h.addEventListener("click",B)),x.addEventListener("click",Z),v.addEventListener("click",G),y.addEventListener("click",(function(){return $(T)}))),J(o),document.addEventListener("keydown",q)}function t(e,t){var o=1<arguments.length&&void 0!==t?t:j,a=e.href;return o===j?a&&a.toLowerCase().startsWith(k)&&!e.classList.contains("no-mailgo")||e.hasAttribute("data-address")&&(a&&"#mailgo"===e.getAttribute("href").toLowerCase()||e.classList&&e.classList.contains("mailgo")):o===A&&(a&&(a.toLowerCase().startsWith(L)||a.toLowerCase().startsWith(z))&&!e.classList.contains("no-mailgo")||e.hasAttribute("data-tel")&&a&&"#mailgo"===e.getAttribute("href").toLowerCase()||e.classList&&e.classList.contains("mailgo"))}function o(e){return/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}var a,n,i,d,l,r,c,s,m,p,u,b,f,h,g,x,v,w,y,C,k="mailto:",L="tel:",z="callto:",j="mail",A="tel",E="javascript:void(0);",N="span",S="",R="",_="",M="",U="",I="",T="",O="",P="",W=function(){var e="https://mail.google.com/mail/u/0/?view=cm&source=mailto&to="+encodeURIComponent(S);_&&(e=e.concat("&cc="+encodeURIComponent(_))),M&&(e=e.concat("&bcc="+encodeURIComponent(M))),U&&(e=e.concat("&subject="+U)),I&&(e=e.concat("&body="+I)),window.open(e,"_blank"),K()},H=function(){var e="https://outlook.live.com/owa/?path=/mail/action/compose&to="+encodeURIComponent(S);U&&(e=e.concat("&subject="+U)),I&&(e=e.concat("&body="+I)),window.open(e,"_blank"),K()},D=function(){ee(R),K()},B=function(){var e="https://t.me/"+O;window.open(e,"_blank"),K()},Z=function(){var e="skype:"+(""!==P?P:T);window.open(e,"_blank"),K()},F=function(){var e="https://wa.me/"+T;window.open(e,"_blank"),K()},G=function(){var e="tel:"+T;window.open(e),K()},$=function(e){var t;le(e),(t=Q(j)?w:y).textContent="copied",setTimeout((function(){t.textContent="copy",K()}),999)},q=function(e){if(Q(j))switch(e.keyCode){case 27:K();break;case 71:W();break;case 79:H();break;case 32:caseLine truncated
|
||||
+18
-19
@@ -1,6 +1,6 @@
|
||||
const mailgoVersion: string = "MAILGO_VERSION";
|
||||
|
||||
(() => {
|
||||
const mailgo = () => {
|
||||
// links
|
||||
const MAILTO: string = "mailto:";
|
||||
const TEL: string = "tel:";
|
||||
@@ -750,9 +750,6 @@ const mailgoVersion: string = "MAILGO_VERSION";
|
||||
return by;
|
||||
};
|
||||
|
||||
// window exists
|
||||
const windowExists = () => window && typeof window !== "undefined";
|
||||
|
||||
// create element
|
||||
const createElement = (element: string = "div") =>
|
||||
document.createElement(element);
|
||||
@@ -827,21 +824,23 @@ const mailgoVersion: string = "MAILGO_VERSION";
|
||||
// start mailgo
|
||||
(() => {
|
||||
// if the window object exists...
|
||||
if (windowExists()) {
|
||||
// mailgo style (gulp)
|
||||
let mailgoCSS: HTMLStyleElement = <HTMLStyleElement>(
|
||||
createElement("style")
|
||||
);
|
||||
mailgoCSS.id = "mailgo-style";
|
||||
mailgoCSS.type = "text/css";
|
||||
mailgoCSS.appendChild(createTextNode(`MAILGO_STYLE`));
|
||||
document.head.appendChild(mailgoCSS);
|
||||
// mailgo style (gulp)
|
||||
let mailgoCSS: HTMLStyleElement = <HTMLStyleElement>createElement("style");
|
||||
mailgoCSS.id = "mailgo-style";
|
||||
mailgoCSS.type = "text/css";
|
||||
mailgoCSS.appendChild(createTextNode(`MAILGO_STYLE`));
|
||||
document.head.appendChild(mailgoCSS);
|
||||
|
||||
// DOMContentLoaded -> mailgoInit (creates the modals)
|
||||
document.addEventListener("DOMContentLoaded", mailgoInit);
|
||||
// DOMContentLoaded -> mailgoInit (creates the modals)
|
||||
document.addEventListener("DOMContentLoaded", mailgoInit);
|
||||
|
||||
// event listener on body, if the element is mailgo-compatible the mailgo modal will be rendered
|
||||
document.addEventListener("click", mailgoCheckRender);
|
||||
}
|
||||
// event listener on body, if the element is mailgo-compatible the mailgo modal will be rendered
|
||||
document.addEventListener("click", mailgoCheckRender);
|
||||
})();
|
||||
})();
|
||||
};
|
||||
|
||||
if (window && typeof window !== "undefined") {
|
||||
mailgo();
|
||||
}
|
||||
|
||||
export default mailgo();
|
||||
Reference in new issue
Block a user