diff options
Diffstat (limited to 'static/main.js')
-rw-r--r-- | static/main.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/static/main.js b/static/main.js index 5e7c18c..002a4fe 100644 --- a/static/main.js +++ b/static/main.js @@ -23,6 +23,14 @@ document.addEventListener("DOMContentLoaded", () => { // Disable Android Chrome "tap to search" when revealing spoiler text [...d[q]("mark")].forEach(e => e.tabIndex = "-1"); + // Trigger like button animation + d.querySelector("#like-post").addEventListener("click", function() { + setTimeout(() => this[l].remove("like-anim"), 700); + this[l].add("like-anim"); + this[l].add("liked"); + }); + + /* const ZLM_UNICODE_START = 0xED80; const LERFU_INDEX = "ptkflscmx.' 1234bdgvrzjn`-,~ aeiouy qw AEIOUY"; const lerfuLookup = c => String.fromCodePoint(ZLM_UNICODE_START + LERFU_INDEX.indexOf(c)); @@ -38,4 +46,5 @@ document.addEventListener("DOMContentLoaded", () => { } [...d[q]("[lang=jbo]")].forEach(e => e.innerText = e.innerText.split("").map(latinToZlm).join("")); + //*/ }); |