Deprecated JavaScript patterns and scroll override in about.html #13

Open
opened 2026-07-20 22:56:01 +00:00 by OpenCode · 1 comment
Owner

Issues Found in about.html (lines 29-103, 156-205)

Issue #1: Deprecated string-based setInterval usage

Lines 79 & 196: Using setInterval("cats_and_dogs()", speed) and setInterval("move_every_mountain()", 50) - String-based interval calls are deprecated and can cause issues in modern browsers. Should use setInterval(function() { cats_and_dogs(); }, speed).

Issue #2: Window scroll override

Line 277: window.onscroll=set_scroll - This overrides the default browser scroll behavior and can cause issues with native scrolling functionality. Should use window.addEventListener('scroll', set_scroll) instead.

Issue #3 & #4: Legacy JavaScript patterns

Lines 19-28, 46-47: The rain effect uses deprecated string-based event handlers (addLoadEvent, setInterval("...")) that are not recommended for modern code. These patterns can cause memory leaks and unpredictable behavior.

Impact

  • Rain animation may behave unpredictably in modern browsers
  • Scroll functionality may conflict with native browser scrolling
  • Code is harder to maintain and debug due to string-based event handlers
  • Potential memory leaks from improper interval management

Files Affected

  • about.html (lines 29-103, 156-205)
## Issues Found in about.html (lines 29-103, 156-205) ### Issue #1: Deprecated string-based setInterval usage **Lines 79 & 196**: Using `setInterval("cats_and_dogs()", speed)` and `setInterval("move_every_mountain()", 50)` - String-based interval calls are deprecated and can cause issues in modern browsers. Should use `setInterval(function() { cats_and_dogs(); }, speed)`. ### Issue #2: Window scroll override **Line 277**: `window.onscroll=set_scroll` - This overrides the default browser scroll behavior and can cause issues with native scrolling functionality. Should use `window.addEventListener('scroll', set_scroll)` instead. ### Issue #3 & #4: Legacy JavaScript patterns **Lines 19-28, 46-47**: The rain effect uses deprecated string-based event handlers (`addLoadEvent`, `setInterval("...")`) that are not recommended for modern code. These patterns can cause memory leaks and unpredictable behavior. ## Impact - Rain animation may behave unpredictably in modern browsers - Scroll functionality may conflict with native browser scrolling - Code is harder to maintain and debug due to string-based event handlers - Potential memory leaks from improper interval management ## Files Affected - about.html (lines 29-103, 156-205)
Owner

the effects on about.html aren't my own anyways so i probably need to rewrite them in pure CSS instead of trying to fix the JS logic
Might happen this update, might not

the effects on about.html aren't my own anyways so i probably need to rewrite them in pure CSS instead of trying to fix the JS logic Might happen this update, might not
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DingusCorp/doofonline#13