File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed
Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 2525 < div id ="app "> </ div >
2626 < script type ="module " src ="/src/main.ts "> </ script >
2727 < script async defer src ="https://cabin.archiguesser.com/hello.js "> </ script >
28+ < script >
29+ try {
30+ const urlParameters = new URLSearchParams ( window . location . search ) ;
31+ const requestedDay = urlParameters . get ( "day" ) ;
32+ const isArcadeMode = urlParameters . get ( "challenge" ) || false ;
33+
34+ if ( ! isArcadeMode ) {
35+ let day ;
36+ if (
37+ requestedDay &&
38+ ! isNaN ( parseInt ( requestedDay ) )
39+ ) {
40+ day = parseInt ( requestedDay ) ;
41+ } else {
42+ const StartDate = Date . UTC ( 2022 , 6 , 1 ) ;
43+ const now = new Date ( ) ;
44+ const timestamp1 = Date . UTC (
45+ now . getFullYear ( ) ,
46+ now . getMonth ( ) ,
47+ now . getDate ( ) ,
48+ ) ;
49+ const differenceInMilliseconds = timestamp1 - StartDate ;
50+ const differenceInDays = differenceInMilliseconds / 1000 / 60 / 60 / 24 ;
51+
52+ day = differenceInDays ;
53+ }
54+
55+ let link = document . createElement ( 'link' ) ;
56+ link . as = 'image' ;
57+ link . type = 'image/jpeg' ;
58+ link . rel = 'preload' ;
59+ link . href = `${ day } /1.jpg` ;
60+ document . head . appendChild ( link ) ;
61+ }
62+ } catch ( e ) { console . error ( e ) ; }
63+ </ script >
2864 </ body >
2965</ html >
Original file line number Diff line number Diff line change 11User-agent: *
2- Disallow:
2+ Disallow:
You can’t perform that action at this time.
0 commit comments