Conversation
|
Hold up, fixing CI / Build |
008311f to
affbe6c
Compare
|
Done. Fixed CI / build issue. Codacy has some stuff but I got it done. |
abbf8e7 to
cd587a3
Compare
|
I apologize for the many pushes, there were some issues I couldn't tell where it was wrong |
6e9ab1d to
2612e87
Compare
|
Done! Finally, sorry for the delay and commits. Feature for issue #1852 is finally added. |
aarushtools
left a comment
There was a problem hiding this comment.
Please rebase latest thanks
2612e87 to
db9250e
Compare
2e55a52 to
d62eea9
Compare
d62eea9 to
8af19c4
Compare
|
| '<i class="fas fa-leaf" style="font-size:16pt;position:relative;top:3px;left:6px;"></i>' + | ||
| '<span style="position:relative;bottom:9px;left:15px;">Turn Off<br>Thanksgiving Theme</span>' + | ||
| '</a>'; | ||
| document.querySelector('ul.nav').appendChild(liOff); |
There was a problem hiding this comment.
Mobile navigation null dereference
At widths below 1000px, this assumes every page shell has ul.nav. On a shell without that element, querySelector returns null and appendChild throws. The header toggle has already been hidden, so no mobile control is available; thanksgiving-cookie.js:13 contains the same unguarded append and also prevents users from re-enabling the theme. Guard the lookup in both scripts, with an intentional fallback container if these controls must appear on nav-less pages.
Artifacts
▶ Current Thanksgiving theme at 800px on a shell without ul.nav
- Chromium recording of the current source on a page whose header has no `ul.nav`; the ready handler reaches the missing-nav branch and throws, so no mobile navigation toggle appears.
Current Thanksgiving theme before-case poster frame
- Poster frame for the current-source browser reproduction on the shell without `ul.nav`.
▶ Null-guarded comparison at 800px on a shell without ul.nav
- Chromium recording of the same shell with a test-only null guard replacing line 66; execution completes without a page error, confirming the unguarded append is the failure point.
Null-guarded comparison poster frame
- Poster frame for the null-guarded comparison browser reproduction.
Focused Playwright reproduction script
- The exact Node Playwright script executed against the repository Thanksgiving source and the same deliberately nav-less shell for both recordings.
Observed Playwright reproduction output
- Captured command output shows the current-source TypeError and comparison run without errors, together with DOM observations from both executions.
| var enabled = Cookies.get('disable-thanksgiving') == '1' ? '0' : '1'; | ||
| Cookies.set('disable-thanksgiving', enabled, { expires: 7 }); |
There was a problem hiding this comment.
Opt-out cookie expires before Thanksgiving ends
The server activates the theme for eight inclusive calendar dates, from seven days before Thanksgiving through the end of Thanksgiving Day, but this preference lasts only seven days. A user who turns the theme off when the period opens receives a cookie that expires at the start of Thanksgiving Day, so later requests that day restore the theme without another choice by the user. Extend the lifetime in both toggle scripts so it covers the complete inclusive activation period.
Artifacts
Chromium test script for Thanksgiving disable-cookie expiry
- The exact focused Playwright test reads and executes the repository's Thanksgiving toggle and vendored cookie implementation, demonstrating the expiration comparison.
Successful Chromium expiry test output
- Command metadata and observed current-versus-eight-day cookie expiration output show that the seven-day cookie expires at Thanksgiving's opening instant.
▶ Current seven-day Thanksgiving disable cookie expires at Thanksgiving start
- Headless Chromium executes the current repository code at the active-window opening instant and displays expiry at Nov 26 00:00 UTC, proving the premature re-enable condition.
Poster frame showing the current cookie expiry at Thanksgiving start
- The current-code poster shows the captured cookie write and that it expires before the inclusive Thanksgiving Day end.
▶ Eight-day Thanksgiving disable cookie remains through the server window
- Headless Chromium executes the controlled eight-day comparison and shows expiry after Thanksgiving Day, demonstrating the minimal correction.
Poster frame showing the eight-day cookie expiry after Thanksgiving ends
- The comparison poster shows a Nov 27 expiry, so the disable state persists past the final inclusive activation day.
Added a Thanksgiving theme.
It starts a week before Thanksgiving until the day is over.
Custom autumn colors, and falling leaves.
Leaves do not stack as they are emojis unlike the snowflakes, making it super laggy.
Emojis may render differently per OS, but trivial issue compared to the benefit of not having to load assets.
There is also a turkey trotting at the bottom!
Toggle on/off button for the theme. Preference is stored.
-Ben Ahn 5/22/2026
Closes issue #1852