release: prepare Hulumath v1.2.0
This commit is contained in:
@@ -148,6 +148,16 @@ function showToast(message) {
|
||||
window.setTimeout(() => toast.classList.remove("show"), 2600);
|
||||
}
|
||||
|
||||
async function copyWechatName() {
|
||||
const name = $("#wechat-copy").dataset.wechatName;
|
||||
try {
|
||||
await navigator.clipboard.writeText(name);
|
||||
showToast(`已复制公众号名称:${name}`);
|
||||
} catch {
|
||||
showToast(`请在微信内搜索:${name}`);
|
||||
}
|
||||
}
|
||||
|
||||
function navigate(view) {
|
||||
$$(".nav-item").forEach((button) => button.classList.toggle("active", button.dataset.view === view));
|
||||
$$(".view").forEach((section) => section.classList.toggle("active", section.id === `view-${view}`));
|
||||
@@ -1273,6 +1283,7 @@ function bindUI() {
|
||||
$$("[data-jump]").forEach((button) => button.addEventListener("click", () => navigate(button.dataset.jump)));
|
||||
$$("[data-open-auth]").forEach((button) => button.addEventListener("click", openAuth));
|
||||
$("#start-mathbti").addEventListener("click", startMathBTI);
|
||||
$("#wechat-copy").addEventListener("click", copyWechatName);
|
||||
$("#story-experience-close").addEventListener("click", closeStoryExperience);
|
||||
$("#save-formula").addEventListener("click", saveFormula);
|
||||
$("#latex-source").addEventListener("input", (event) => { renderLatexPreview(event.target.value); });
|
||||
|
||||
Reference in New Issue
Block a user