From 8f56e1a8d9f3debbe253125f2d90fd38e768cc47 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=90=B4=E6=A2=A8=E6=A2=A8?=
<24567775+qinlili23333@users.noreply.github.com>
Date: Wed, 13 Dec 2023 12:21:21 +0800
Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E4=B8=80=E6=AD=A5=E4=BC=98=E5=8C=96?=
=?UTF-8?q?=E8=BF=94=E5=9B=9E=E4=BD=93=E9=AA=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
index.html | 12 +++++++++---
settings.html | 15 +++++++++++++++
sw.js | 4 ++--
tools.html | 15 +++++++++++++++
version.json | 4 ++--
5 files changed, 43 insertions(+), 7 deletions(-)
diff --git a/index.html b/index.html
index 0881dbf..1973397 100644
--- a/index.html
+++ b/index.html
@@ -752,7 +752,7 @@
去全部歌单里添加一些吧
await sleep(295);
document.getElementById("floatMenu").style.overflowY = "auto";
if (window.CloseWatcher) {
- let MenuBack = new CloseWatcher();
+ window.MenuBack = new CloseWatcher();
MenuBack.onclose = () => {
lastClickMenu = lastClick;
hideMenu();
@@ -768,6 +768,9 @@ 去全部歌单里添加一些吧
document.getElementById("floatMenuContainer").style.display = "none";
menuList.innerHTML = "";
document.getElementById("floatMenu").style.transition = "max-height 0.3s linear";
+ if (window.CloseWatcher) {
+ window.MenuBack.destroy();
+ }
};
window.addEventListener("resize", async (event) => {
if (document.getElementById("floatMenuContainer").style.display == "block") {
@@ -1109,6 +1112,9 @@ 去全部歌单里添加一些吧
await sleep(200);
audioFilesModule.style.display = "none";
audioFilesModule.innerHTML = "";
+ if (window.CloseWatcher) {
+ window.FolderBack.destroy();
+ }
break;
};
case 1: {
@@ -1119,7 +1125,7 @@ 去全部歌单里添加一些吧
await sleep(200);
audioFolderModule.style.display = "none";
if (window.CloseWatcher) {
- let FolderBack = new CloseWatcher();
+ window.FolderBack = new CloseWatcher();
FolderBack.onclose = () => {
switchListDisplay(0);
};
@@ -1623,7 +1629,7 @@ 去全部歌单里添加一些吧
document.title = "545在线";
if (window.CloseWatcher) {
const createWatcher = () => {
- let WindowBack = new CloseWatcher();
+ window.WindowBack = new CloseWatcher();
WindowBack.onclose = () => {
setTempStatus("2秒内再按一次返回退出", 2000);
setTimeout(createWatcher, 2000);
diff --git a/settings.html b/settings.html
index b0f543f..d22324d 100644
--- a/settings.html
+++ b/settings.html
@@ -575,6 +575,9 @@ 设置
document.getElementById("floatMenu").style.marginTop = "100vh";
await sleep(500);
document.getElementById("floatMenuContainer").style.display = "none";
+ if (window.CloseWatcher) {
+ window.FrameBack.destroy();
+ }
}
if (event.data.startsWith("http")) {
document.getElementById("loading").style.display = "block";
@@ -593,6 +596,15 @@ 设置
document.getElementById("floatMenu").style.marginTop = "10vh";
document.getElementById("loading").style.display = "block";
rebuildFrame(url);
+ if (window.CloseWatcher) {
+ window.FrameBack = new CloseWatcher();
+ FrameBack.onclose = async () => {
+ document.getElementById("floatMenu").style.marginTop = "100vh";
+ document.getElementById("floatMenuContainer").style.opacity = 0;
+ await sleep(500);
+ document.getElementById("floatMenuContainer").style.display = "none";
+ };
+ }
}
document.getElementById("closeBtn").addEventListener("click", async (event) => {
event.stopPropagation();
@@ -600,6 +612,9 @@ 设置
document.getElementById("floatMenuContainer").style.opacity = 0;
await sleep(500);
document.getElementById("floatMenuContainer").style.display = "none";
+ if (window.CloseWatcher) {
+ window.FrameBack.destroy();
+ }
})
if (localStorage.randomMethod == "list") {
document.getElementById("randomCheckbox").checked = true;
diff --git a/sw.js b/sw.js
index 98e348d..521554f 100644
--- a/sw.js
+++ b/sw.js
@@ -1,6 +1,6 @@
var APP_PREFIX = '545在线'
-var VERSION = '2.2.0.20231212'
-var VERSION_AZUSA_PATCH_USE = '2.1.1.20230910'
+var VERSION = '2.2.1.20231213'
+var VERSION_AZUSA_PATCH_USE = '2.2.0.20231212'
var AZUSA_PATCH_SKIP_LIST = [
'./cursor/normal.png',
'./icon.webp',
diff --git a/tools.html b/tools.html
index 3e51aad..e2d9f02 100644
--- a/tools.html
+++ b/tools.html
@@ -264,6 +264,9 @@ 工具箱
document.getElementById("floatMenu").style.marginTop = "100vh";
await sleep(500);
document.getElementById("floatMenuContainer").style.display = "none";
+ if (window.CloseWatcher) {
+ window.FrameBack.destroy();
+ }
}
if (event.data.startsWith("http")) {
document.getElementById("loading").style.display = "block";
@@ -285,6 +288,15 @@ 工具箱
if (wide) {
document.getElementById("setFrame").style.maxWidth = "100vw";
}
+ if (window.CloseWatcher) {
+ window.FrameBack = new CloseWatcher();
+ FrameBack.onclose = async () => {
+ document.getElementById("floatMenu").style.marginTop = "100vh";
+ document.getElementById("floatMenuContainer").style.opacity = 0;
+ await sleep(500);
+ document.getElementById("floatMenuContainer").style.display = "none";
+ };
+ }
}
document.getElementById("closeBtn").addEventListener("click", async (event) => {
event.stopPropagation();
@@ -293,6 +305,9 @@ 工具箱
await sleep(500);
document.getElementById("floatMenuContainer").style.display = "none";
document.getElementById("floatMenu").removeChild(document.getElementById("setFrame"));
+ if (window.CloseWatcher) {
+ window.FrameBack.destroy();
+ }
})
window.titleCount = 0;
document.getElementById("titleText").addEventListener("click", () => {
diff --git a/version.json b/version.json
index 556e0c6..da16271 100644
--- a/version.json
+++ b/version.json
@@ -1,5 +1,5 @@
{
"success": true,
- "latest": "2.2.0.20231212",
- "azusa_patch_avaliable": "2.1.1.20230910"
+ "latest": "2.2.1.20231213",
+ "azusa_patch_avaliable": "2.2.0.20231212"
}
\ No newline at end of file