File tree 2 files changed +18
-11
lines changed
2 files changed +18
-11
lines changed Original file line number Diff line number Diff line change 234
234
{ name: " Shannon" , score: 1.33 },
235
235
{ name: " Luke" , score: 0 }
236
236
]
237
- setTimeout (function (){
237
+
238
+ window .onload = setTimeout (function (){
239
+ console .log (' this works' )
238
240
alert (" Good job on arriving on time and preventing an axe!" )
239
- },30 * 1000 )
241
+ },5000 )
242
+
240
243
$ .ajax ({
241
244
method: ' POST' ,
242
245
url: ' https://hasura-codeday.herokuapp.com/v1alpha1/graphql' ,
254
257
score: item .points
255
258
})
256
259
})
260
+
257
261
data .data .event .forEach ((item ) => {
258
262
events .push ({
259
263
name: item .name ,
277
281
eventsElement .append (toEventHtml (i .name , i .time , i .location , i .id ))
278
282
})
279
283
}
284
+ const html = ` <div id="see" style="
285
+ width: 100%;
286
+ margin: 1rem;
287
+ margin-bottom: 1.5rem;
288
+ text-align:center;
289
+ cursor: pointer;
290
+ " ><a href="/user/scoreboard">See all players</a></div>`
291
+ scoreboardElement .append (html)
280
292
281
293
})
282
294
function toEventHtml (name , time , location , id ) {
338
350
const scoreboardElement = $ (' #scoreboard-inner' )
339
351
$ (' #events-button' ).click (() => window .location .href = " /event/create" )
340
352
341
- const html = ` <div id="see" style="
342
- width: 100%;
343
- margin: 1rem;
344
- margin-bottom: 1.5rem;
345
- text-align:center;
346
- cursor: pointer;
347
- " ><a href="/user/scoreboard">See all players</a></div>`
348
- scoreboardElement .append (html)
353
+
349
354
</script >
350
355
<script >
351
356
let userLocation = { lat: 37.7749 , lng: - 122.4194 }
Original file line number Diff line number Diff line change 233
233
}
234
234
}
235
235
})
236
-
236
+ setTimeout (function (){
237
+ alert (" Good job on arriving on time and preventing an axe!" )
238
+ },5000 )
237
239
function toEventHtml (name , time , location , id ) {
238
240
return `
239
241
<a href="/events/${ id} ">
You can’t perform that action at this time.
0 commit comments