Skip to content

Commit

Permalink
update v1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohong2022 authored May 12, 2023
1 parent fbfa1d7 commit 728d780
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
});
!function () {
document.querySelectorAll(".app-canedit").forEach(e => {
e.default = e.innerText;
e.onclick = function () {
var j = false;
var f = document.createElement("input");
Expand Down Expand Up @@ -45,17 +46,16 @@
e.classList.add("app-editing");
document.body.append(i, f);
f.focus();
function k({ target }) {
if (target === e) return;
if (target === f) return;
f.addEventListener("blur", function () {
if (j) return;
j = true;
if (!f.value) {
e.innerText = e.default
};
i.remove();
f.remove();
e.classList.remove("app-editing");
};
document.body.addEventListener("click", k);
document.body.addEventListener("contextmenu", k);
});
}
})
}();
Expand Down Expand Up @@ -193,11 +193,12 @@
icon: "info",
buttons: false,
title: "关于",
text: `《流浪地球2》倒计时制作 v1.0.0
text: `《流浪地球2》倒计时制作 v1.0.2
Copyright (c) 2023 xiaohong2022
特别鸣谢:
@CodeKpy 提供仓库名
https://www.bilibili.com/read/cv21439547(提供字体)
https://sweetalert.js.org/(提供弹窗)
https://html2canvas.hertzen.com/(提供图片转换)`
Expand All @@ -217,5 +218,5 @@
}
return false;
}
}()
}();
}();

0 comments on commit 728d780

Please sign in to comment.