working on typescript and ssr problems...
This commit is contained in:
1 parent
dd8c7cde9b
commit
1606a2b30a
3 files changed
+18
-13
No files matched your search
Vendored
+1
-1
@@ -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";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
|
||||
!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(){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 _=Y();_.style.display="none",_.id="mailgo-tel",_.classList.add("m-modal");var M=Y();M.className="m-modal-back",_.appendChild(M);var U=Y();U.className="m-modal-content",_.appendChild(U),(d=Y("strong")).id="m-tel-title",d.className="m-title",U.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 I=Y(S);I.className="w-500",I.appendChild(ee("Telegram")),x.appendChild(I),U.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),U.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),U.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")),U.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")),U.appendChild(k),U.appendChild(X()),document.body.appendChild(_),M.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;M=n.get("cc"),U=n.get("bcc"),I=n.get("subject"),T=n.get("body")}else R=a.getAttribute("data-address")+"@"+a.getAttribute("data-domain"),new URL(L+encodeURIComponent(R)),M=a.getAttribute("data-cc-address")+"@"+a.getAttribute("data-cc-domain"),U=a.getAttribute("data-bcc-address")+"@"+a.getAttribute("data-bcc-domain"),I=a.getAttribute("data-subject"),T=a.getAttribute("data-body");if(!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";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
|
||||
!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(){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 _=Y();_.style.display="none",_.id="mailgo-tel",_.classList.add("m-modal");var M=Y();M.className="m-modal-back",_.appendChild(M);var U=Y();U.className="m-modal-content",_.appendChild(U),(d=Y("strong")).id="m-tel-title",d.className="m-title",U.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 I=Y(S);I.className="w-500",I.appendChild(ee("Telegram")),x.appendChild(I),U.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),U.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),U.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")),U.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")),U.appendChild(k),U.appendChild(X()),document.body.appendChild(_),M.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;M=n.get("cc"),U=n.get("bcc"),I=n.get("subject"),T=n.get("body")}else R=a.getAttribute("data-address")+"@"+a.getAttribute("data-domain"),new URL(L+encodeURIComponent(R)),M=a.getAttribute("data-cc-address")+"@"+a.getAttribute("data-cc-domain"),U=a.getAttribute("data-bcc-address")+"@"+a.getAttribute("data-bcc-domain"),I=a.getAttribute("data-subject"),T=a.getAttribute("data-body");if(!Line truncated
|
||||
+16
-11
@@ -825,19 +825,24 @@ const mailgo = (config?: MailgoConfig) => {
|
||||
|
||||
// start mailgo
|
||||
(() => {
|
||||
// if the window object exists...
|
||||
// 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);
|
||||
// if the window is defined...
|
||||
if (window && typeof window !== "undefined") {
|
||||
// if the window object exists...
|
||||
// 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);
|
||||
}
|
||||
})();
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user