You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change removes inline onclick usage from interactive controls and moves button behavior into script-managed event listeners. The update keeps the existing UI actions intact while eliminating inline JavaScript from the affected templates.
Template changes
Replaced inline button handlers with stable id and data-* hooks across dev tools, console controls, game launchers, footer actions, and profile interactions.
Kept the markup intent explicit by encoding action metadata in attributes instead of executable HTML.
Client-side event wiring
Added centralized listener registration in src/assets/js/script.js via initButtonHandlers().
Mapped declarative hooks to existing behaviors such as secret unlocks, XP awards, console controls, game launches, theme toggle, screenshot mode, and level jump.
Hardened the duel launcher binding to resolve the nearest .user-card[data-name] at click time before invoking startDuelFromCard().
Selector alignment
Updated dev-tool styling rules in src/assets/css/style.css to target the new data-* attributes instead of [onclick*="..."] selectors.
We reviewed changes in 1839f0e...29676bd on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
The reason will be displayed to describe this comment to others. Learn more.
Unexpected function declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable
It is considered a best practice to avoid 'polluting' the global scope with variables that are intended to be local to the script. Global variables created from a script can produce name collisions with global variables created from another script, which will usually lead to runtime errors or unexpected behavior. It is mostly useful for browser scripts.
The reason will be displayed to describe this comment to others. Learn more.
Unexpected function declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable
It is considered a best practice to avoid 'polluting' the global scope with variables that are intended to be local to the script. Global variables created from a script can produce name collisions with global variables created from another script, which will usually lead to runtime errors or unexpected behavior. It is mostly useful for browser scripts.
The reason will be displayed to describe this comment to others. Learn more.
Unexpected function declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable
It is considered a best practice to avoid 'polluting' the global scope with variables that are intended to be local to the script. Global variables created from a script can produce name collisions with global variables created from another script, which will usually lead to runtime errors or unexpected behavior. It is mostly useful for browser scripts.
The reason will be displayed to describe this comment to others. Learn more.
'CodeBreaker' is not defined
Variables that aren't defined, but accessed may throw reference errors at runtime.
NOTE: In browser applications, DeepSource recommends the use of ESModules over regular text/javascript scripts.
Using variables that are injected by scripts included in an HTML file is currently not supported.
The reason will be displayed to describe this comment to others. Learn more.
'SpaceInvaders' is not defined
Variables that aren't defined, but accessed may throw reference errors at runtime.
NOTE: In browser applications, DeepSource recommends the use of ESModules over regular text/javascript scripts.
Using variables that are injected by scripts included in an HTML file is currently not supported.
The reason will be displayed to describe this comment to others. Learn more.
'CodeBreaker' is not defined
Variables that aren't defined, but accessed may throw reference errors at runtime.
NOTE: In browser applications, DeepSource recommends the use of ESModules over regular text/javascript scripts.
Using variables that are injected by scripts included in an HTML file is currently not supported.
The reason will be displayed to describe this comment to others. Learn more.
'startDuelFromCard' is not defined
Variables that aren't defined, but accessed may throw reference errors at runtime.
NOTE: In browser applications, DeepSource recommends the use of ESModules over regular text/javascript scripts.
Using variables that are injected by scripts included in an HTML file is currently not supported.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change removes inline
onclickusage from interactive controls and moves button behavior into script-managed event listeners. The update keeps the existing UI actions intact while eliminating inline JavaScript from the affected templates.Template changes
idanddata-*hooks across dev tools, console controls, game launchers, footer actions, and profile interactions.Client-side event wiring
src/assets/js/script.jsviainitButtonHandlers()..user-card[data-name]at click time before invokingstartDuelFromCard().Selector alignment
src/assets/css/style.cssto target the newdata-*attributes instead of[onclick*="..."]selectors.