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

Hide code via urlParameter doesn't work anymore #294

Open
PLNech opened this issue Mar 4, 2024 · 5 comments · May be fixed by #305
Open

Hide code via urlParameter doesn't work anymore #294

PLNech opened this issue Mar 4, 2024 · 5 comments · May be fixed by #305

Comments

@PLNech
Copy link

PLNech commented Mar 4, 2024

Hey amazing hydra team! I used to be able to hide code by default in my created works on hydra.ojack.xyz with &show-code=false.
I see that it doesn't work anymdraore in previous links I had shared, and indeed the code for that param seems commented:

// this.show()
// // // TO DO: add show code param
// let searchParams = new URLSearchParams(window.location.search)
// let showCode = searchParams.get('show-code')
// if (showCode === "false") {
// this.hide()
// }

Do you know why? I'd love to have this feature again - Happy to brush off my web skills and do a little PR for hydra if you think it's welcome 🤗

@ojack
Copy link
Member

ojack commented Mar 4, 2024

it should work with 'showCode=false'!

we should make it work with 'show-code' also

@PLNech
Copy link
Author

PLNech commented Mar 4, 2024

Ah nice, indeed this works! I'll use this for new creations 🤗

As for supporting the old syntax, good idea it would fix already shared links 😁

Thank you @ojack for the super quick reply 🙏

@ojack
Copy link
Member

ojack commented Mar 4, 2024 via email

@asorc
Copy link

asorc commented Jun 3, 2024

Sorry... Where do I have to type '&show-code=false'?

Is It possible to do It also on tablets and smartphones?

Thanks in advance...

@PLNech
Copy link
Author

PLNech commented Jun 19, 2024

@asorc in the URL! for example if you load this work of mine

https://hydra.ojack.xyz/?sketch_id=vK0m5fziaoD5yUfp

You will see the code:

image


While if you load

https://hydra.ojack.xyz/?sketch_id=vK0m5fziaoD5yUfp&showCode=false

You only see the work:

image

@PLNech PLNech linked a pull request Jun 19, 2024 that will close this issue
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 a pull request may close this issue.

3 participants