From 98700533474376730da3dbbb1efa468a01a4be19 Mon Sep 17 00:00:00 2001 From: Shan Wenxiao Date: Sat, 31 Aug 2024 18:32:58 +0800 Subject: [PATCH 1/3] Fix Memory DIsplay (Closes #706) Signed-off-by: Shan Wenxiao --- XMOJ.user.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/XMOJ.user.js b/XMOJ.user.js index 200586e9..fd6a0817 100644 --- a/XMOJ.user.js +++ b/XMOJ.user.js @@ -322,13 +322,15 @@ let SizeToStringSize = (Memory) => { try { if (UtilityEnabled("AddUnits")) { if (Memory < 1024) { - return Memory + "KB"; + return Memory + "B"; } else if (Memory < 1024 * 1024) { - return (Memory / 1024).toFixed(2) + "MB"; + return (Memory / 1024).toFixed(2) + "KB"; } else if (Memory < 1024 * 1024 * 1024) { - return (Memory / 1024 / 1024).toFixed(2) + "GB"; + return (Memory / 1024 / 1024).toFixed(2) + "MB"; + } else if (Memory < 1024 * 1024 * 1024) { + return (Memory / 1024 / 1024 / 1024).toFixed(2) + "GB"; } else { - return (Memory / 1024 / 1024 / 1024).toFixed(2) + "TB"; + return (Memory / 1024 / 1024 / 1024 / 1024).toFixed(2) + "TB"; } } else { return Memory; From 82e519b7399cca68598e3404fb8181e79efcd869 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 31 Aug 2024 10:33:43 +0000 Subject: [PATCH 2/3] 1.2.62 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fcf8d18b..9fe0dc69 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xmoj-script", - "version": "1.2.61", + "version": "1.2.62", "description": "an improvement script for xmoj.tech", "main": "AddonScript.js", "scripts": { From fe7470f15b9c0193c679f936bb86afa2fe75aa42 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 31 Aug 2024 10:33:44 +0000 Subject: [PATCH 3/3] Update version info to 1.2.62 --- Update.json | 11 +++++++++++ XMOJ.user.js | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Update.json b/Update.json index 2e081583..c7730464 100644 --- a/Update.json +++ b/Update.json @@ -2521,6 +2521,17 @@ } ], "Notes": "No release notes were provided for this release." + }, + "1.2.62": { + "UpdateDate": 1725100423891, + "Prerelease": true, + "UpdateContents": [ + { + "PR": 728, + "Description": "Fix Memory DIsplay (Closes #706)" + } + ], + "Notes": "No release notes were provided for this release." } } } \ No newline at end of file diff --git a/XMOJ.user.js b/XMOJ.user.js index fd6a0817..bc7c8868 100644 --- a/XMOJ.user.js +++ b/XMOJ.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name XMOJ -// @version 1.2.61 +// @version 1.2.62 // @description XMOJ增强脚本 // @author @XMOJ-Script-dev, @langningchen and the community // @namespace https://github/langningchen