shorthand helper functions
This commit is contained in:
parent
eec0f14a35
commit
92f061f87c
6
dist/mailgo.js
vendored
6
dist/mailgo.js
vendored
@ -232,7 +232,7 @@ var mailgoRender = function mailgoRender(mailgo) {
|
|||||||
|
|
||||||
showMailgo(); // listener keyDown
|
showMailgo(); // listener keyDown
|
||||||
|
|
||||||
document.body.addEventListener("keydown", function () {
|
mailgo.addEventListener("keydown", function () {
|
||||||
mailgoKeydown(mail, url, mailtoHref, encEmail, copyButton);
|
mailgoKeydown(mail, url, mailtoHref, encEmail, copyButton);
|
||||||
}, false);
|
}, false);
|
||||||
}; // actions
|
}; // actions
|
||||||
@ -356,12 +356,12 @@ var copyToClipboard = function copyToClipboard(str) {
|
|||||||
|
|
||||||
|
|
||||||
var showMailgo = function showMailgo() {
|
var showMailgo = function showMailgo() {
|
||||||
getE("mailgo").style.display = "flex";
|
return getE("mailgo").style.display = "flex";
|
||||||
}; // hide the modal
|
}; // hide the modal
|
||||||
|
|
||||||
|
|
||||||
var hideMailgo = function hideMailgo() {
|
var hideMailgo = function hideMailgo() {
|
||||||
getE("mailgo").style.display = "none";
|
return getE("mailgo").style.display = "none";
|
||||||
}; // is the modal hidden?
|
}; // is the modal hidden?
|
||||||
|
|
||||||
|
|
||||||
|
2
dist/mailgo.min.js
vendored
2
dist/mailgo.min.js
vendored
File diff suppressed because one or more lines are too long
@ -311,7 +311,7 @@ const mailgoRender = mailgo => {
|
|||||||
showMailgo();
|
showMailgo();
|
||||||
|
|
||||||
// listener keyDown
|
// listener keyDown
|
||||||
document.body.addEventListener(
|
mailgo.addEventListener(
|
||||||
"keydown",
|
"keydown",
|
||||||
() => {
|
() => {
|
||||||
mailgoKeydown(mail, url, mailtoHref, encEmail, copyButton);
|
mailgoKeydown(mail, url, mailtoHref, encEmail, copyButton);
|
||||||
@ -455,19 +455,13 @@ const copyToClipboard = str => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// show the modal
|
// show the modal
|
||||||
const showMailgo = () => {
|
const showMailgo = () => (getE("mailgo").style.display = "flex");
|
||||||
getE("mailgo").style.display = "flex";
|
|
||||||
};
|
|
||||||
|
|
||||||
// hide the modal
|
// hide the modal
|
||||||
const hideMailgo = () => {
|
const hideMailgo = () => (getE("mailgo").style.display = "none");
|
||||||
getE("mailgo").style.display = "none";
|
|
||||||
};
|
|
||||||
|
|
||||||
// is the modal hidden?
|
// is the modal hidden?
|
||||||
const mailgoIsShowing = () => {
|
const mailgoIsShowing = () => getE("mailgo").style.display === "flex";
|
||||||
return getE("mailgo").style.display === "flex";
|
|
||||||
};
|
|
||||||
|
|
||||||
// decrypt email
|
// decrypt email
|
||||||
const mailToEncoded = encoded =>
|
const mailToEncoded = encoded =>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user