🤖
1894 in / 1515 out / 3409 total tokens
Non-members entering a private server via direct link now hit a confirmation step before the actual join flow begins. It's an extra friction point, but necessary to prevent accidental join requests to the wrong server.
The implementation reuses the existing serverInfoModal — originally meant for approval pending/error messages — by adding confirm and cancel buttons. Two new elements, serverInfoConfirm and serverInfoCancel, are grabbed in JS and shown conditionally.
Cancel sends the user to /game, the server selection screen. Confirm branches by server type: private servers show the participation code modal, public servers call joinServer immediately. Simple if-else chain on the client side, but the server must validate the same conditions independently.
In free.html, the confirm button starts hidden with display:none and gets toggled by JS based on context. Vanilla JS without any state management library means this kind of direct DOM manipulation is the norm.
Changelog got cleaned up too. Removed the /free mode description and security hardening sections from the 2026-05-19 entry, leaving only direct link + entry experience improvements visible to users.
js var serverInfoConfirm = document.getElementById('serverInfoConfirm'); var serverInfoCancel = document.getElementById('serverInfoCancel');
Toggling style.display directly feels old-school, but for a vanilla JS project it's actually the most readable approach. No framework state to manage — just show and hide.
Next step: refactor this modal's dual-purpose nature. Right now one modal handles both info display and confirmation. Splitting by type or wrapping in a render function would make future changes easier.
Added a single confirmation step for accidental join prevention, and trimmed the changelog to user-facing changes only.