gulp
This commit is contained in:
parent
edb2d43601
commit
3c22edcd7a
19
dist/mailgo.js
vendored
19
dist/mailgo.js
vendored
@ -1,5 +1,7 @@
|
|||||||
// Your CSS as text
|
// ottengo tutti i mailto contenuti nella pagina
|
||||||
var styles = `
|
let mailgos = document.querySelectorAll('a[href^="mailto:"]:not(.no-mailgo)');
|
||||||
|
|
||||||
|
let styles = `
|
||||||
.mailgo-modal-container {
|
.mailgo-modal-container {
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
@ -10,10 +12,7 @@ styleSheet.type = "text/css";
|
|||||||
styleSheet.innerText = styles;
|
styleSheet.innerText = styles;
|
||||||
document.head.appendChild(styleSheet);
|
document.head.appendChild(styleSheet);
|
||||||
|
|
||||||
// ottengo tutti i mailto contenuti nella pagina
|
console.log("mailgo is WIP!");
|
||||||
let mailgos = document.querySelectorAll('a[href^="mailto:"]:not(.no-mailgo)');
|
|
||||||
|
|
||||||
console.log("mailgo is WIP");
|
|
||||||
|
|
||||||
// attivo mailgo su tutti gli elementi
|
// attivo mailgo su tutti gli elementi
|
||||||
mailgos.forEach(mailgo => {
|
mailgos.forEach(mailgo => {
|
||||||
@ -34,14 +33,6 @@ mailgos.forEach(mailgo => {
|
|||||||
event => {
|
event => {
|
||||||
// blocco l'esecuzione normale del mailto:
|
// blocco l'esecuzione normale del mailto:
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
// mostro un alert
|
|
||||||
/*
|
|
||||||
let r = confirm("You have clicked mailto: " + mailto.href);
|
|
||||||
if (r === true) {
|
|
||||||
location.href = mailto.href;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
},
|
},
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
// Your CSS as text
|
// ottengo tutti i mailto contenuti nella pagina
|
||||||
var styles = `
|
let mailgos = document.querySelectorAll('a[href^="mailto:"]:not(.no-mailgo)');
|
||||||
|
|
||||||
|
let styles = `
|
||||||
.mailgo-modal-container {
|
.mailgo-modal-container {
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
@ -10,10 +12,7 @@ styleSheet.type = "text/css";
|
|||||||
styleSheet.innerText = styles;
|
styleSheet.innerText = styles;
|
||||||
document.head.appendChild(styleSheet);
|
document.head.appendChild(styleSheet);
|
||||||
|
|
||||||
// ottengo tutti i mailto contenuti nella pagina
|
console.log("mailgo is WIP!");
|
||||||
let mailgos = document.querySelectorAll('a[href^="mailto:"]:not(.no-mailgo)');
|
|
||||||
|
|
||||||
console.log("mailgo is WIP");
|
|
||||||
|
|
||||||
// attivo mailgo su tutti gli elementi
|
// attivo mailgo su tutti gli elementi
|
||||||
mailgos.forEach(mailgo => {
|
mailgos.forEach(mailgo => {
|
||||||
@ -34,14 +33,6 @@ mailgos.forEach(mailgo => {
|
|||||||
event => {
|
event => {
|
||||||
// blocco l'esecuzione normale del mailto:
|
// blocco l'esecuzione normale del mailto:
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
// mostro un alert
|
|
||||||
/*
|
|
||||||
let r = confirm("You have clicked mailto: " + mailto.href);
|
|
||||||
if (r === true) {
|
|
||||||
location.href = mailto.href;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
},
|
},
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user