From 0da5a1739ab88cc8e21b1adf4524996902f21ebf Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Tue, 9 Apr 2024 23:15:58 +0800 Subject: [PATCH] move scripts to _src/ --- _includes/footer.html | 7 ------- _src/entrypoints/default.js | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/_includes/footer.html b/_includes/footer.html index a9fe2f1..57d1b24 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -62,13 +62,6 @@ WebFont.load({ families: ['Lato'] } }); -(function () { -var lei3Po8h = ["support", ["tuna", "tsinghua", "edu", "cn"].join(".")].join("@"); -document.querySelectorAll('a.eib1gieB').forEach(function (el) { - el.textConetent=lei3Po8h; - el.href=["ma","ilto:"].join("i")+lei3Po8h; -}); -})(); {% fa_svg_generate %} diff --git a/_src/entrypoints/default.js b/_src/entrypoints/default.js index 1c0ec0b..8fe85aa 100644 --- a/_src/entrypoints/default.js +++ b/_src/entrypoints/default.js @@ -12,3 +12,11 @@ if (siteSuffix) { }); } } + +const lei3Po8h = ["support", ["tuna", "tsinghua", "edu", "cn"].join(".")].join( + "@", +); +Array.from(document.querySelectorAll("a.eib1gieB")).forEach((el) => { + el.textContent = lei3Po8h; + el.href = ["ma", "ilto:"].join("i") + lei3Po8h; +});