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

Modals #649

Closed
wants to merge 12 commits into from
Closed

Modals #649

wants to merge 12 commits into from

Conversation

Twingamerdudes
Copy link

@Twingamerdudes Twingamerdudes commented Jun 27, 2023

Modals in TurboWarp.
image

@LilyMakesThings
Copy link
Contributor

CUSTOM MODALLLSSS I LOVE THIS!!

@Twingamerdudes
Copy link
Author

Thanks! The amount of effort to get even normal modals working was insane!

@Twingamerdudes
Copy link
Author

New blocks that I have added
image

@yuri-kiss
Copy link
Member

yuri-kiss commented Jun 28, 2023

you need to make the dialogs/modals text only, As you can run JavaScript with them, example in linked video.
JS.webm <-- CLICK THE LINK!!!

@Twingamerdudes
Copy link
Author

oh fuck, 1 day in and someone already found an exploit in it.

@yuri-kiss
Copy link
Member

Lol yeah

@yuri-kiss
Copy link
Member

span.innerHTML is the problem, your telling it to accept the given data as HTML.

@Twingamerdudes
Copy link
Author

I fixed it! I'm a dumbass for using innerHTML and span tbh. I changed it to a paragraph instead. Also, I used textContent as well.

@Twingamerdudes
Copy link
Author

image

@yuri-kiss
Copy link
Member

:D, nice, but you should probally remove the dialog element when it is closed as you make a new one everytime.

@yuri-kiss
Copy link
Member

image

@Twingamerdudes
Copy link
Author

That should be fixed now.

Copy link
Member

@yuri-kiss yuri-kiss left a comment

Choose a reason for hiding this comment

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

i was wondering the same thing loll

@Twingamerdudes
Copy link
Author

Twingamerdudes commented Jun 28, 2023

there was some git madness from trying to replace my openai extension repo lol.

@XeroName
Copy link
Contributor

XeroName commented Jun 29, 2023

Never thought about modals. It looks good to easy pop-up message.

But "Green flag" block already exists at "Runtime Options" and "Set var : if/else" block is replaceable to "Couplers" extension. Also the boolean <variable> block, too.
So I suggest how about focusing to "custom modal" category that people who want to use recognize it instantly.

@Twingamerdudes
Copy link
Author

yeah, I kinda added those in as some extra blocks.

@GarboMuffin
Copy link
Member

GarboMuffin commented Jul 2, 2023

Related: #674

Some specific examples of the problems described in that issue:

  • The average user who sees "Random Utilities" and "Random, and maybe useful utilities" will not expect the extension to be mostly modals
  • Most people would load this for modals. Do they really need "setVariableIfElse", "greenFlag", "swapLetters"?
  • greenFlag is duplicated in two other extensions
  • If swapLetters isn't already in text, then add it to that one instead of making a new extension

The modals are interesting. If you change this extension to something that just focuses on modals, that should be fine

@Twingamerdudes
Copy link
Author

Easier said then done

@Twingamerdudes Twingamerdudes changed the title Random Utilities Modals Jul 2, 2023
@Twingamerdudes
Copy link
Author

this request thread basically died, probably going to make a new pr that isn't so Random Utils focused.

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.

5 participants