File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 259259 // ── Toggle button ────────────────────────────────────────────────────────────
260260
261261 const TOGGLE_LABELS = { ascii : '[ life ]' , gol : '[ matrix ]' } ;
262+ // ASCII-only pool for button glitch — avoids double-width CJK glyphs shifting layout
263+ const BTN_CHARS = '0123456789ABCDEFabcdef+x=[]{}|/<>?!#$%' ;
264+ function rbchar ( ) { return BTN_CHARS [ Math . random ( ) * BTN_CHARS . length | 0 ] ; }
262265
263266 function buildLabel ( btn , label ) {
264267 btn . innerHTML = '' ;
279282 setInterval ( ( ) => {
280283 for ( const s of btn . querySelectorAll ( 'span' ) ) {
281284 if ( Math . random ( ) < 0.14 ) {
282- s . textContent = rchar ( ) ;
285+ s . textContent = rbchar ( ) ;
283286 setTimeout ( ( ) => { s . textContent = s . dataset . orig ; } , 80 ) ;
284287 }
285288 }
Original file line number Diff line number Diff line change 154154 display : block;
155155 padding : 1rem 1rem 1rem 1.1rem ;
156156 border-left : 2px solid var (--border );
157- background : rgba (7 , 7 , 6 , 0.2 );
157+ background : rgba (7 , 7 , 6 , 0.6 );
158158 text-decoration : none;
159159 transition : background 0.15s , border-color 0.15s ;
160160 }
You can’t perform that action at this time.
0 commit comments