From 03ec4e036dbb8e7f7a3fc8b63b2bb4efa0cab5c2 Mon Sep 17 00:00:00 2001 From: Karis004 <2862309436@qq.com> Date: Fri, 13 Jun 2025 15:11:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E8=AE=BE=E7=BD=AE=E7=95=8C=E9=9D=A2=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/moodle/js/content.js | 2 + scripts/setting/jsx/Setting.js | 104 +++++++++++++++++++++++---------- 2 files changed, 74 insertions(+), 32 deletions(-) diff --git a/scripts/moodle/js/content.js b/scripts/moodle/js/content.js index 45e8597..dd8e0e2 100644 --- a/scripts/moodle/js/content.js +++ b/scripts/moodle/js/content.js @@ -428,9 +428,11 @@ function jumpToExamBase() { if (data.ExamBaseFly) { jumpTabFixed.style.opacity = "0"; jumpTab.style.display = "block"; + fly = true; } else { jumpTabFixed.style.opacity = "1"; jumpTab.style.display = "none"; + fly = false; } }); } diff --git a/scripts/setting/jsx/Setting.js b/scripts/setting/jsx/Setting.js index fa54e2a..eaac405 100644 --- a/scripts/setting/jsx/Setting.js +++ b/scripts/setting/jsx/Setting.js @@ -82,19 +82,23 @@ window.popup.SetUserForm = function (custom, inner) { } let textInputStyle = { - border: "1px solid #ccc", - borderRadius: "3px", - boxShadow: "0 1px 1px rgba(0, 0, 0, 0.075) inset", - color: "#555", + // border: "1px solid #ccc", + // borderRadius: "3px", + // boxShadow: "0 1px 1px rgba(0, 0, 0, 0.075) inset", + // color: "#555", display: "block", - fontSize: "14px", - height: "34px", + // fontSize: "14px", + height: "40px", lineHeight: "1.42857", padding: "6px 12px", - transition: "border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s", + // transition: "border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s", width: "90%", margin: "auto", marginBottom: "10px", + border: "1px solid #e0e0e0", + borderRadius: "6px", + fontSize: "1rem", + background: "#f9f9f9", } return window.elements.Div(null, [ @@ -124,16 +128,27 @@ window.popup.SetUserForm = function (custom, inner) { innerText: "Save", style: { width: "90%", + // margin: "auto", + // display: "block", + // color: "white", + // backgroundColor: "#007bff", + // borderColor: "#007bff", + // padding: "6px 12px", + // fontSize: "14px", + lineHeight: "1", + // borderRadius: "3px", + // cursor: "pointer", + padding: "0.75rem", margin: "auto", - display: "block", - color: "white", - backgroundColor: "#007bff", - borderColor: "#007bff", - padding: "6px 12px", - fontSize: "14px", - lineHeight: "1.42857", - borderRadius: "3px", + border: "none", + borderRadius: "6px", + fontSize: "1rem", cursor: "pointer", + // background: "#3b82f6", + border: "2px solid #3b82f6", + color: "#3b82f6", + background: "white", + fontWeight: "600", }, }), ] @@ -146,16 +161,27 @@ function LogoutButton(custom, inner) { innerText: "Logout", style: { width: "90%", + // margin: "auto", + // display: "block", + // color: "white", + // backgroundColor: "#ff0000", + // borderColor: "#ff0000", + // padding: "6px 12px", + // fontSize: "14px", + lineHeight: "1", + // borderRadius: "3px", + // cursor: "pointer", + padding: "0.75rem", margin: "auto", - display: "block", - color: "white", - backgroundColor: "#ff0000", - borderColor: "#ff0000", - padding: "6px 12px", - fontSize: "14px", - lineHeight: "1.42857", - borderRadius: "3px", + // border: "none", + border: "2px solid #ef4444", + borderRadius: "6px", + fontSize: "1rem", + fontWeight: "600", cursor: "pointer", + // white background + background: "white", + color: "#ef4444", }, onClick: async function () { await chrome.runtime.sendMessage({ @@ -169,7 +195,12 @@ function LogoutButton(custom, inner) { } async function ExamBaseButton(custom, inner) { - return window.elements.Div({}, [ + return window.elements.Div({ + style: { + textAlign: "left", + marginLeft: "15px", + }, + }, [ window.elements.Input( { type: "checkbox", @@ -177,8 +208,9 @@ async function ExamBaseButton(custom, inner) { style: { width: "20px", height: "20px", - marginRight: "10px", - marginTop: "5px", + // marginRight: "10px", + // marginTop: "5px", + verticalAlign: "middle", }, checked: (await window.utils.getStorage('ExamBaseFly')).ExamBaseFly || false, onClick: async function (e) { @@ -194,9 +226,11 @@ async function ExamBaseButton(custom, inner) { htmlFor: "ez-exam-base-checkbox", innerText: "Skyrocketing Exam Base", style: { - fontSize: "16px", - fontWeight: "bold", + fontSize: "15px", color: "#555555", + verticalAlign: "middle", + marginLeft: "10px", + marginBottom: "0", }, }), ]) @@ -210,12 +244,18 @@ function SettingBlock(name, element) { margin: "10px 0", }, }, [ - window.elements.H3({ + window.elements.H2({ innerText: name, style: { - marginBottom: "10px", - fontSize: "20px", - fontWeight: "bold", + // marginBottom: "10px", + fontSize: "17px", + // fontWeight: "bold", + fontWeight: "500", + color: "#666", + marginBottom: "17px", + marginLeft: "15px", + height: "1.5rem", + textAlign: "left", }, }), element, From f8885754e76ca774a8dcaab339c110fb74022fc9 Mon Sep 17 00:00:00 2001 From: adlsdztony Date: Sat, 14 Jun 2025 06:22:26 +0000 Subject: [PATCH 2/2] chore: bump version to 1.3.0.6 [pre-release] --- manifest.json | 2 +- scripts/help/jsx/Help.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index d7d5aad..d06e3fd 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "SuperEZ BETA", - "version": "1.3.0.5", + "version": "1.3.0.6", "description": "Better online HKU experience with SuperEZ (THIS EXTENSION IS FOR BETA TESTING)", "background": { "service_worker": "scripts/background.js" diff --git a/scripts/help/jsx/Help.js b/scripts/help/jsx/Help.js index a173e27..b638a48 100644 --- a/scripts/help/jsx/Help.js +++ b/scripts/help/jsx/Help.js @@ -27,7 +27,7 @@ window.popup.HelpPopup = async function (custom, inner) { innerText: "Powered by EZ-HKU with ❤️", }), window.elements.Div({ - innerText: "v1.3.0.5", + innerText: "v1.3.0.6", }), window.elements.A({ href: "https://github.com/EZ-HKU/SuperEZ/wiki",