From f0f26061a5b23b292230d5291f77b934c929df11 Mon Sep 17 00:00:00 2001 From: Spectrollay <2819288472@qq.com> Date: Tue, 10 Sep 2024 13:53:39 +0800 Subject: [PATCH] 2024090903 --- Verification/file-hashes.json | 4 ++-- Verification/project-hash.json | 2 +- experiments/index.js | 4 ++-- javascript/custom_elements.js | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Verification/file-hashes.json b/Verification/file-hashes.json index 065448d..aaa6abd 100644 --- a/Verification/file-hashes.json +++ b/Verification/file-hashes.json @@ -10,7 +10,7 @@ "donate.html": "26df29641e07c5a582eca1068971fb48", "experiments\\index.css": "0ef80c42887552a3734a200d13a3e8cd", "experiments\\index.html": "ec259e3546b3f1fddc9aa8c0e923d920", - "experiments\\index.js": "165f037f38aabbf7360a8f0c8122aa14", + "experiments\\index.js": "b0b2f4198f6cd85147df8e84670e5d2a", "Feed\\database.xml": "c3b1879c690866f41a3479f7ed28edb6", "Feed\\main.xml": "f5be196f7e0f95f94eee17f5c73efcd5", "Feed\\messages.xml": "1c24a98ff83bdc56d026043d412bd778", @@ -132,7 +132,7 @@ "issue_tracker\\index.html": "edc1f27b2d6381751ed4d60d7aa53ccc", "javascript\\accessibility.js": "4c3d2f7fe221a2bc26da35c85eb344f4", "javascript\\advanced.js": "288d119cbdc37f0fddc5dc651bab47d8", - "javascript\\custom_elements.js": "51be7d545bc64128831d187e9b2347cd", + "javascript\\custom_elements.js": "3f9f4240329ef539462bdeb8dafdf830", "javascript\\editions.js": "795a056b1011d662f3cbd38c41962bee", "javascript\\public_define.js": "13e6cc8c4fbfb0cad4dfce352a92f6e0", "javascript\\public_script.js": "92f0dffd50c059db5fb0378f60cd9168", diff --git a/Verification/project-hash.json b/Verification/project-hash.json index c1a0ee5..8b8a135 100644 --- a/Verification/project-hash.json +++ b/Verification/project-hash.json @@ -1,3 +1,3 @@ { - "projectHash": "8db2b5e3664218535b27d944ce005add" + "projectHash": "aacc3f412ead5c3e895df20378c8dc0c" } \ No newline at end of file diff --git a/experiments/index.js b/experiments/index.js index 0c14d8f..d4e853e 100644 --- a/experiments/index.js +++ b/experiments/index.js @@ -35,7 +35,7 @@ let newFlagsPageSwitch = document.getElementById('new_flags_page'); let newFlagsPageState; if (newFlagsPageSwitch) { - newFlagsPageState = localStorage.getItem('(/minecraft_repository_test/)new_flags_page') || 'off'; // 默认禁用 + newFlagsPageState = localStorage.getItem('(/minecraft_repository_test/)new_flags_page') || newFlagsPageSwitch.getAttribute('active'); // 默认禁用 if (newFlagsPageState === 'on') { newFlagsPageSwitch.setAttribute('active', 'on'); } else { @@ -60,7 +60,7 @@ function flagsPage() { // 实验性无障碍 let expAccessibilitySwitch = document.getElementById('experimental_accessibility'); -let expAccessibilityState = localStorage.getItem('(/minecraft_repository_test/)experimental_accessibility') || 'on'; // 默认启用 +let expAccessibilityState = localStorage.getItem('(/minecraft_repository_test/)experimental_accessibility') || expAccessibilitySwitch.getAttribute('active'); // 默认启用 if (expAccessibilitySwitch) { if (expAccessibilityState === 'on') { diff --git a/javascript/custom_elements.js b/javascript/custom_elements.js index 7f6abb2..02eca0b 100644 --- a/javascript/custom_elements.js +++ b/javascript/custom_elements.js @@ -517,7 +517,6 @@ class CustomSwitch extends HTMLElement { switchStatus.textContent = `Toggle: ${isOn ? 'Open' : 'Close'}`; } } - } customElements.define('custom-switch', CustomSwitch);