Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add JS code detection to prevent misuse of SimpleScript interpreter #3

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

Open
SokolovskyiK wants to merge 1 commit into ProgrammerKR:Pro123
base: Pro123
Choose a base branch
Loading
from SokolovskyiK:Pro123

Conversation

@SokolovskyiK
Copy link

@SokolovskyiK SokolovskyiK commented Apr 9, 2025
edited
Loading

Summary

This PR adds a simple check to prevent confusion when users try to run valid JavaScript code like "for (let i = 0; i < 5; i++)" instead of SimpleScript syntax "for i = 1 to 5 do print(i) endfor" inside the SimpleScript editor.

What I added

  • A quick new Function(code) check inside runSimpleScript()
  • If the code is valid JS, it stops execution and shows:

    "HEY! Stop putting JS here, we are learning SimpleScript! Enter VALID SimpleScript code."

Why

There was an open issue (#1) where a user expected JS-style for loops to work. This prevents that mistake in a fun way 😄

Sorry for slightly diverging from the original task — I figured a small UX tweak like this might still be helpful for future users.

Copy link

vercel bot commented Apr 9, 2025
edited
Loading

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
simple-script ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 9, 2025 7:08pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /