This repository has been archived on 2025-03-17. You can view files and clone it, but cannot push or open issues or pull requests.
reinefjord.net-v2/src/static/js/common.js
2018-08-05 18:53:28 +02:00

21 lines
473 B
JavaScript

function emaildecode() {
var emails = document.getElementsByClassName("encoded");
for (var i = 0; i < emails.length; i++) {
var b64 = emails[i].innerHTML;
var decoded = window.atob(b64);
emails[i].innerHTML = decoded;
emails[i].href = "mailto:" + decoded;
}
}
function hidenojs() {
var nojs = document.getElementsByClassName("nojs");
for (var i = 0; i < nojs.length; i++) {
nojs[i].style.display = "none";
}
}
emaildecode();
hidenojs();