Skip to content

refactor: code cleanup#326

Merged
Berny23 merged 19 commits into
Berny23:masterfrom
Tivertoni:master
May 26, 2026
Merged

refactor: code cleanup#326
Berny23 merged 19 commits into
Berny23:masterfrom
Tivertoni:master

Conversation

@Tivertoni

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread index.js
Comment thread index.js
@Berny23

Berny23 commented May 26, 2026

Copy link
Copy Markdown
Owner

Thanks, looks good! Please check my two review comments.

@Tivertoni

Copy link
Copy Markdown
Contributor Author

So of the removed cases from the switch statement in RGBToHex(r,g,b) were removed in this PR as both have an earlier case which catches them:

LD-ToyPad-Emulator/index.js

Lines 222 to 223 in 10db8c9

case "#000018":
return "#0000ff"; //blue

LD-ToyPad-Emulator/index.js

Lines 232 to 233 in 10db8c9

case "#000018":
return "#0000ff";

LD-ToyPad-Emulator/index.js

Lines 267 to 268 in 10db8c9

case "#000016":
return "#0000ff";

LD-ToyPad-Emulator/index.js

Lines 273 to 274 in 10db8c9

case "#000016":
return "#00ffff";

@Tivertoni

Copy link
Copy Markdown
Contributor Author

I noticed a few bugs, I will convert this to a draft for now.

@Tivertoni Tivertoni marked this pull request as draft May 26, 2026 15:32
@Tivertoni Tivertoni marked this pull request as ready for review May 26, 2026 18:29
@Tivertoni Tivertoni requested a review from Berny23 May 26, 2026 18:29

@Berny23 Berny23 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks.

@Berny23 Berny23 merged commit bbbfa55 into Berny23:master May 26, 2026
2 checks passed
@Berny23 Berny23 mentioned this pull request May 26, 2026
Glitxhhh pushed a commit to Glitxhhh/LD-ToyPad-Emulator that referenced this pull request May 30, 2026
Brings in 20 upstream commits: JS code quality refactoring
(var->let/const, for-of loops, find vs filter, childNode.remove(),
Number.parseInt, Set for world blacklist, move functions to global scope)
and two bug fixes (remove deleted tokens from JSON, remove invalid assignment).

Conflict resolutions:
- server/stylesheets/main.css: kept fork CSS variable theming system
  (dark/light theme with CSS custom properties) — upstream "remove duplicate
  CSS" commit is not applicable to the rewritten stylesheet
- server/index.html: combined upstream lang="en" with fork data-theme="dark"
  on the <html> tag to get both accessibility and default dark theme
- server/scripts/main.js: took upstream global-scope function layout, then
  restored fork improvements to createItemHtml (has-image class, token-name
  span, flex image styling) and applyNameFilter (.token-name targeting fix)

Post-merge fix:
- index.js: reverted node: require prefix (node:fs/path/http -> fs/path/http)
  added by upstream commit 2f76c6d — requires Node 14.18+, breaks npm setup
  which targets Node 11

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants