hugo-theme-lowtech/assets/js/obfuscates.js

10 lines
365 B
JavaScript

export default function abfuscates() {
const obfuscates = document.getElementsByClassName("obfuscate");
while (obfuscates.length > 0) {
const element = obfuscates[0]
element.href = element.dataset.link.split("").reverse().join("");
element.innerText = element.innerText.split("").reverse().join("");
element.classList.remove('obfuscate');
}
}