Skip to content

Conversation

@aaronsb
Copy link

@aaronsb aaronsb commented Dec 11, 2025

Summary

This PR consolidates ~5 years of open community contributions and adds a new URL parameter feature for easy sharing.

Merged Community PRs (11 total)

Bug Fixes:

New Games (7):

New Feature: URL Parameter Sharing

From the README:

Two commonly asked questions are "Does the death generator have an API?" and "Can I easily run it from the command line?" and the answer to both questions is no.

This PR adds a lightweight alternative for the sharing use case: URL query parameters.

Examples:

?text=Custom%20message#doom
?text=Hello&Portrait=Giles1&Background=Buffy#darkhul
?text=Message&wordwrap=off&transparent=on#bsod

Features:

  • ?text= parameter for custom text (supports newlines as %0A, formatting tags like [inverse])
  • Overlay parameters (dropdowns/sliders) by name (e.g., ?Portrait=Giles1)
  • Checkbox parameters (?wordwrap=off, ?transparent=on)
  • Auto-updating URL: As users edit text or change settings, the URL updates in real-time
  • Clean URLs: Only non-default values are included
  • Switching generators resets to default text (no carryover bug)

Users can now easily share specific generator configurations by copying the URL from their browser.

Test Plan

  • Tested URL parameters across multiple generators (BSOD, Doom, Zelda, Pokemon, Space Quest, Dragon Warrior, Buffy)
  • Verified formatting tags work ([inverse]...[/])
  • Verified overlay parameters work
  • Verified URL auto-updates on text/setting changes
  • Verified dice roll resets to new generator's default text
  • All merged PRs tested individually

Kawa-oneechan and others added 30 commits March 25, 2019 17:19
With free arms for Beetrice.
it's how the game does it, unless you manually type it in

which you could
Added most of what would be needed to implement Battle Network 5 functionality
Allows passing text to generators via ?text= query parameter,
enabling shareable links with pre-filled quotes.
Example: index.html?text=Your%20message#bsod
Extends the query parameter feature to support:
- Overlay dropdowns/sliders (e.g., ?Portrait=Buffy2&Background=Buffy)
- Checkboxes (e.g., ?wordwrap=off&transparent=on)

Example: ?text=Hello&Portrait=Giles1&Background=Buffy#darkhul
- URL automatically updates as user changes text, overlays, or checkboxes
- Text updates are debounced (500ms) to avoid excessive URL changes
- Only non-default values are included in URL (keeps URLs clean)
- Fixed text carryover bug: switching generators now resets to default text
- Fixed transparent checkbox ID reference
@langel
Copy link
Contributor

langel commented Dec 11, 2025

wow good work!

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.