feat: Cache le mail et numéro de téléphone

This commit is contained in:
2021-07-03 16:08:10 +02:00
parent 5e5369affc
commit 1217428813
5 changed files with 16 additions and 25 deletions

View File

@ -1,25 +1,6 @@
'use strict';
function reverse(str) { return str.split("").reverse().join(""); }
function getName() { return "nomis"; }
function getAt() { return "@"; }
function getDomain() { return "okew"; }
function getDot() { return "."; }
function getTld() { return "oi"; }
function getAddress() { return reverse(getName()) + getAt() + reverse(getDomain()) + getDot() + reverse(getTld()); }
function comments(elm) {
var link = document.getElementById('comment-add');
link.href = "mai" + "lto:" + getAddress() + "?subject=" + link.dataset.title;
elm.remove();
}
function contact() {
var link = document.getElementById('contact');
if (link) {
link.href = "mai" + "lto:" + getAddress();
}
}
import obfuscates from 'js/obfuscates';
obfuscates();
function changeTheme() {
// https://css-tricks.com/a-complete-guide-to-dark-mode-on-the-web/#using-javascript-local-storage
const btn = document.querySelector(".btn-toggle");
@ -51,8 +32,7 @@ function changeTheme() {
}
function main() {
// menu();
contact();
obfuscates();
changeTheme();
}