@@ -17,7 +17,7 @@ let isSurging = false;
1717
1818let audioCtx ;
1919
20- let unlockedEggs = JSON . parse ( localStorage . getItem ( "unlockedEggs" ) ) || [ ] ;
20+ const unlockedEggs = JSON . parse ( localStorage . getItem ( "unlockedEggs" ) ) || [ ] ;
2121let surpriseClickCount = 0 ;
2222let matrixActive = false ;
2323let destructInterval ;
@@ -312,7 +312,7 @@ function reopenConsole() {
312312let isProcessingXP = false ;
313313
314314// Ensure this is in the GLOBAL scope (not hidden inside another function)
315- window . createFloatingXP = function ( e ) {
315+ window . createFloatingXP = ( e ) => {
316316 // Prevent "spam" firing from high-speed mouse movement
317317 if ( isProcessingXP ) return ;
318318 isProcessingXP = true ;
@@ -837,7 +837,7 @@ document
837837/**
838838 * 7. SELF DESTRUCT ENGINE
839839 */
840- window . startSelfDestruct = function ( ) {
840+ window . startSelfDestruct = ( ) => {
841841 const btn = document . getElementById ( "self-destruct-btn" ) ;
842842 const devPanel = document . getElementById ( "dev-tools" ) ;
843843
@@ -965,7 +965,7 @@ function scrollToRandomUser() {
965965/**
966966 * UTILITY: SCREENSHOT MODE
967967 */
968- window . toggleScreenshotMode = function ( ) {
968+ window . toggleScreenshotMode = ( ) => {
969969 const devPanel = document . getElementById ( "dev-tools" ) ;
970970 const header = document . querySelector ( "header" ) ;
971971 const footer = document . querySelector ( "footer" ) ;
@@ -1081,7 +1081,7 @@ document.addEventListener("keydown", (e) => {
10811081
10821082async function addExperience ( amount ) {
10831083 // 1. Force strict numeric types to prevent "1" + "1" = "11"
1084- let xpToAdd = Number ( amount ) || 0 ;
1084+ const xpToAdd = Number ( amount ) || 0 ;
10851085 currentXP = Number ( currentXP ) || 0 ;
10861086 currentLevel = Number ( currentLevel ) || 0 ;
10871087 const XP_THRESHOLD = 45 ;
@@ -1143,7 +1143,7 @@ function updateInventoryCounts(lvl) {
11431143 const levelEntry = LEVELS [ i ] ;
11441144 if ( levelEntry ?. rarity ) {
11451145 const r = levelEntry . rarity . toLowerCase ( ) ;
1146- if ( counts . hasOwnProperty ( r ) ) {
1146+ if ( Object . hasOwn ( counts , r ) ) {
11471147 counts [ r ] ++ ;
11481148 }
11491149 }
@@ -1278,7 +1278,7 @@ function initProfileTracker() {
12781278
12791279 // Only increment if the link text contains "Profile"
12801280 if ( targetLink ?. textContent ?. includes ( "Profile" ) ) {
1281- let currentCount = parseInt (
1281+ const currentCount = parseInt (
12821282 localStorage . getItem ( "profile_view_count" ) || 0 ,
12831283 ) ;
12841284 localStorage . setItem ( "profile_view_count" , currentCount + 1 ) ;
0 commit comments