From 976b1bb4b845b201c0f89696ac3d71512cbeff83 Mon Sep 17 00:00:00 2001 From: Matteo Manzinello Date: Thu, 2 May 2019 18:34:16 +0200 Subject: [PATCH] webpack.config.js --- dist/mailgo.js | 31 +--------- package-lock.json | 155 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + webpack.config.js | 17 +++++ 4 files changed, 174 insertions(+), 30 deletions(-) create mode 100644 webpack.config.js diff --git a/dist/mailgo.js b/dist/mailgo.js index 648108f..eb33280 100644 --- a/dist/mailgo.js +++ b/dist/mailgo.js @@ -1,30 +1 @@ -// ottengo tutti i mailto contenuti nella pagina -let mailtos = document.querySelectorAll('a[href^="mailto:"]:not(.no-mailgo)'); - -console.log("mailgo is WIP"); - -// attivo mailgo su tutti gli elementi -mailtos.forEach(mailto => { - /* - var newDiv = document.createElement("div"); - var newContent = document.createTextNode("hi!"); - newDiv.appendChild(newContent); - - mailto.parentNode.insertBefore(newDiv, mailto.nextSibling); - */ - - mailto.addEventListener( - "click", - event => { - // blocco l'esecuzione normale del mailto: - event.preventDefault(); - - // mostro un alert - let r = confirm("You have clicked mailto: " + mailto.href); - if (r === true) { - location.href = mailto.href; - } - }, - false - ); -}); +!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){"use strict";t.r(n);t(1);let r=document.querySelectorAll('a[href^="mailto:"]:not(.no-mailgo)');console.log("mailgo is WIP"),r.forEach(e=>{let n=document.createElement("div");n.className="mailgo-modal-container";let t=document.createElement("div");t.className="mailgo-modal",n.appendChild(t);let r=document.createTextNode("mailgo");t.appendChild(r),e.parentNode.insertBefore(n,e.nextSibling),e.addEventListener("click",e=>{e.preventDefault()},!1)})},function(e,n,t){(e.exports=t(2)(!1)).push([e.i,".mailgo-container {\n background: white;\n}\n",""])},function(e,n,t){"use strict";e.exports=function(e){var n=[];return n.toString=function(){return this.map(function(n){var t=function(e,n){var t=e[1]||"",r=e[3];if(!r)return t;if(n&&"function"==typeof btoa){var o=(u=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(u))))+" */"),i=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[t].concat(i).concat([o]).join("\n")}var u;return[t].join("\n")}(n,e);return n[2]?"@media "+n[2]+"{"+t+"}":t}).join("")},n.i=function(e,t){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o