@@ -162,7 +162,7 @@ async function submitQuiz(){
162162 const hash = await sha256 ( JSON . stringify ( { id :c . id , answers :APP . quizAnswers , score, time :elapsed , aiMode :APP . aiMode , pasteCount :APP . pasteCount , tabSwitches :APP . tabSwitchCount , ts :Date . now ( ) } ) ) ;
163163 const integrity = computeIntegrity ( APP . pasteCount , APP . tabSwitchCount , APP . aiMode ) ;
164164 const cred = { id :hash . slice ( 0 , 16 ) , challengeId :c . id , domain :c . domain , title :c . title , score, time :elapsed , hash, aiMode :APP . aiMode , pasteCount :APP . pasteCount , tabSwitches :APP . tabSwitchCount , integrity :integrity . label , timestamp :new Date ( ) . toISOString ( ) } ;
165- APP . credentials . push ( cred ) ; saveState ( ) ; showResults ( cred , correctCount + '/' + c . questions . length + ' correct' ) ;
165+ APP . credentials . push ( cred ) ; saveState ( ) ; showResults ( cred , correctCount + '/' + c . questions . length + ' correct' ) ; maybeShowSignupNudge ( ) ;
166166}
167167function runTests ( ) {
168168 const c = APP . activeChallenge ; const code = document . getElementById ( 'code-input' ) . value ;
@@ -183,7 +183,7 @@ async function submitCode(){
183183 const hash = await sha256 ( JSON . stringify ( { id :c . id , code, score, time :elapsed , aiMode :APP . aiMode , pasteCount :APP . pasteCount , tabSwitches :APP . tabSwitchCount , ts :Date . now ( ) } ) ) ;
184184 const integrity = computeIntegrity ( APP . pasteCount , APP . tabSwitchCount , APP . aiMode ) ;
185185 const cred = { id :hash . slice ( 0 , 16 ) , challengeId :c . id , domain :c . domain , title :c . title , score, time :elapsed , hash, aiMode :APP . aiMode , pasteCount :APP . pasteCount , tabSwitches :APP . tabSwitchCount , integrity :integrity . label , timestamp :new Date ( ) . toISOString ( ) } ;
186- APP . credentials . push ( cred ) ; saveState ( ) ; showResults ( cred , passed + '/' + c . tests . length + ' tests passed' ) ;
186+ APP . credentials . push ( cred ) ; saveState ( ) ; showResults ( cred , passed + '/' + c . tests . length + ' tests passed' ) ; maybeShowSignupNudge ( ) ;
187187}
188188async function submitValidate ( ) {
189189 clearInterval ( timerInterval ) ; const c = APP . activeChallenge ; if ( ! c ) return ;
@@ -210,7 +210,7 @@ async function submitValidate(){
210210 const hash = await sha256 ( JSON . stringify ( { id :c . id , answers, score, time :elapsed , aiMode :APP . aiMode , pasteCount :APP . pasteCount , tabSwitches :APP . tabSwitchCount , ts :Date . now ( ) } ) ) ;
211211 const integrity = computeIntegrity ( APP . pasteCount , APP . tabSwitchCount , APP . aiMode ) ;
212212 const cred = { id :hash . slice ( 0 , 16 ) , challengeId :c . id , domain :c . domain , title :c . title , score, time :elapsed , hash, aiMode :APP . aiMode , pasteCount :APP . pasteCount , tabSwitches :APP . tabSwitchCount , integrity :integrity . label , timestamp :new Date ( ) . toISOString ( ) } ;
213- APP . credentials . push ( cred ) ; saveState ( ) ; showResults ( cred , found + '/' + c . bugCount + ' bugs found' ) ;
213+ APP . credentials . push ( cred ) ; saveState ( ) ; showResults ( cred , found + '/' + c . bugCount + ' bugs found' ) ; maybeShowSignupNudge ( ) ;
214214}
215215async function submitPrompt ( ) {
216216 clearInterval ( timerInterval ) ; const c = APP . activeChallenge ;
@@ -227,7 +227,7 @@ async function submitPrompt(){
227227 const hash = await sha256 ( JSON . stringify ( { id :c . id , prompt, score, time :elapsed , aiMode :APP . aiMode , tabSwitches :APP . tabSwitchCount , ts :Date . now ( ) } ) ) ;
228228 const integrity = computeIntegrity ( 0 , APP . tabSwitchCount , APP . aiMode ) ;
229229 const cred = { id :hash . slice ( 0 , 16 ) , challengeId :c . id , domain :c . domain , title :c . title , score, time :elapsed , hash, aiMode :'native' , pasteCount :0 , tabSwitches :APP . tabSwitchCount , integrity :integrity . label , timestamp :new Date ( ) . toISOString ( ) } ;
230- APP . credentials . push ( cred ) ; saveState ( ) ; showResults ( cred , 'Prompt scored ' + score + '/100' ) ;
230+ APP . credentials . push ( cred ) ; saveState ( ) ; showResults ( cred , 'Prompt scored ' + score + '/100' ) ; maybeShowSignupNudge ( ) ;
231231}
232232// ═══════════════════════════════════════
233233// STROOP CHALLENGE ENGINE
@@ -285,7 +285,7 @@ async function finishStroop(){
285285 const cred = { id :hash . slice ( 0 , 16 ) , challengeId :c . id , domain :c . domain , title :c . title , score, time :elapsed , hash, aiMode :APP . aiMode , pasteCount :0 , tabSwitches :APP . tabSwitchCount , integrity :integrity . label , timestamp :new Date ( ) . toISOString ( ) ,
286286 meta :{ accuracy, avgReactionMs :avgTime , speedBonus, correct :APP . stroopCorrect , total :APP . stroopTotal } } ;
287287 APP . credentials . push ( cred ) ; saveState ( ) ;
288- showResults ( cred , APP . stroopCorrect + '/' + APP . stroopTotal + ' correct — avg ' + avgTime + 'ms' ) ;
288+ showResults ( cred , APP . stroopCorrect + '/' + APP . stroopTotal + ' correct — avg ' + avgTime + 'ms' ) ; maybeShowSignupNudge ( ) ;
289289}
290290// ═══════════════════════════════════════
291291// SPEED PARSE CHALLENGE ENGINE
@@ -327,7 +327,7 @@ async function submitSpeedParse(){
327327 const cred = { id :hash . slice ( 0 , 16 ) , challengeId :c . id , domain :c . domain , title :c . title , score, time :elapsed , hash, aiMode :APP . aiMode , pasteCount :0 , tabSwitches :APP . tabSwitchCount , integrity :integrity . label , timestamp :new Date ( ) . toISOString ( ) ,
328328 meta :{ correct, total :snippet . questions . length , recallRate :score } } ;
329329 APP . credentials . push ( cred ) ; saveState ( ) ;
330- showResults ( cred , correct + '/' + snippet . questions . length + ' recalled correctly' ) ;
330+ showResults ( cred , correct + '/' + snippet . questions . length + ' recalled correctly' ) ; maybeShowSignupNudge ( ) ;
331331}
332332// ═══════════════════════════════════════
333333// AI VALIDATE (ADVANCED) ENGINE
@@ -367,5 +367,5 @@ async function submitAIValidate(){
367367 const cred = { id :hash . slice ( 0 , 16 ) , challengeId :c . id , domain :c . domain , title :c . title , score, time :elapsed , hash, aiMode :APP . aiMode , pasteCount :APP . pasteCount , tabSwitches :APP . tabSwitchCount , integrity :integrity . label , timestamp :new Date ( ) . toISOString ( ) ,
368368 meta :{ bugsFound :found , bugCount :c . bugCount , detailBonus, matchDetails} } ;
369369 APP . credentials . push ( cred ) ; saveState ( ) ;
370- showResults ( cred , found + '/' + c . bugCount + ' bugs found' + ( detailBonus ?' (+' + detailBonus + ' detail bonus)' :'' ) ) ;
370+ showResults ( cred , found + '/' + c . bugCount + ' bugs found' + ( detailBonus ?' (+' + detailBonus + ' detail bonus)' :'' ) ) ; maybeShowSignupNudge ( ) ;
371371}
0 commit comments