themostdangerouswritingapp icon indicating copy to clipboard operation
themostdangerouswritingapp copied to clipboard

Is there a way to set dark mode via URL parameter with for example &theme=dark

Open GitMurf opened this issue 4 years ago • 2 comments

Is there a way to set dark mode via URL parameter like for example: https://maebert.github.io/themostdangerouswritingapp/write?limit=5&type=minutes&theme=dark

By adding &theme=dark on the end.

Thanks!

GitMurf avatar Dec 30 '21 18:12 GitMurf

您的邮件已收到,祝您生活愉快!

JuneOne avatar Dec 30 '21 18:12 JuneOne

Looks like here is the code that grabs the current GET URL parameters so would need to add one here for "theme" to set it to dark mode.

https://github.com/maebert/themostdangerouswritingapp/blob/21dbda4e5765eceda912da51829c9d6fe645a7fb/src/components/MDWA.jsx#L9-L13

GitMurf avatar Dec 30 '21 18:12 GitMurf

您的邮件已收到,祝您生活愉快!

JuneOne avatar Sep 20 '22 11:09 JuneOne

@maebert wow that was a nice surprise! Thank you so much for adding this :)

GitMurf avatar Sep 20 '22 15:09 GitMurf

@maebert I know there is no expectation of you needing to maintain this repo / website but it is still better than the new one, because squibler allows you to export what you wrote even if you fail! Which defeats the purpose in my opinion.

For some reason URL parameters don't work anymore (they haven't for a while now).

For example, if I simply use this URL: https://maebert.github.io/themostdangerouswritingapp/write?limit=5&type=minutes it gives me a 404 file not found (see screenshot below). Any ideas why this may be happening?

image

GitMurf avatar May 22 '23 21:05 GitMurf

您的邮件已收到,祝您生活愉快!

JuneOne avatar May 22 '23 21:05 JuneOne