Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复代码长度单位换算错误 #753

Merged
merged 7 commits into from
Nov 25, 2024

Conversation

boomzero
Copy link
Member

What does this PR aim to accomplish?:

This pull request includes changes to the XMOJ.user.js file, focusing on improving memory size representation and updating label lists. The most important changes include the addition of a new function for memory size conversion and modifications to how memory sizes are displayed.

Closes #706

How does this PR accomplish the above?:

  • XMOJ.user.js: Added a new function CodeSizeToStringSize to convert memory sizes into human-readable formats with units (B, KB, MB, GB). This function includes error handling and debug mode alerts.
  • XMOJ.user.js: Updated the main function to use the new CodeSizeToStringSize function for converting memory sizes, replacing the previous SizeToStringSize function.

By submitting this pull request, I confirm the following:

  1. I have read and understood the contributor's guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented on my proposed changes within the code and I have tested my changes.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the GNU General Public License v3.0
  5. I have squashed any insignificant commits. (git rebase)
  6. I have checked that another pull request for this purpose does not exist.
  7. I have considered and confirmed that this submission will be valuable to others.
  8. I accept that this submission may not be used, and the pull request can be closed at the will of the maintainer.
  9. I give this submission freely and claim no ownership to its content.

  • I have read the above and my PR is ready for review. Check this box to confirm

@hendragon-bot hendragon-bot bot added user-script This issue or pull request is related to the main user script update-script Related to our update infrastructure! labels Nov 25, 2024
@pull-request-size pull-request-size bot added size/M and removed size/S labels Nov 25, 2024
Copy link
Contributor

Qodana for JS

3 new problems were found

Inspection name Severity Problems
Expression statement which is not assignment or call ◽️ Notice 3

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@boomzero boomzero merged commit 4c6ea28 into dev Nov 25, 2024
3 of 4 checks passed
@boomzero boomzero deleted the boomzero/fix-code-size-unit-calc branch November 25, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M update-script Related to our update infrastructure! user-script This issue or pull request is related to the main user script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant