@@ -120,14 +120,15 @@ nowFetch().then(response => {
120120 graphics : graphicsRenderer , graphicsVendor : graphicsVendor , pin : response . pin , deviceWidth : deviceWidth ,
121121 deviceHeight : deviceHeight
122122 }
123- const staticData = {
123+ const dynamicData = {
124124 headers : data . headers , city : data . city , country : data . country , timezone : data . timezone ,
125125 memory : data . memory , platform : data . platform , hardwareConcurrency : data . hardwareConcurrency ,
126126 graphics : graphicsRenderer , graphicsVendor : graphicsVendor , deviceWidth : deviceWidth ,
127127 deviceHeight : deviceHeight , language : language , colorDepth : colorDepth
128128 }
129- const encodedStatic = btoa ( JSON . stringify ( staticData ) )
130- console . log ( encodedStatic )
129+ const encodedDinamic = btoa ( JSON . stringify ( dynamicData ) )
130+ console . log ( encodedDinamic )
131+ console . log ( "HASH:" + sha1 ( encodedDinamic ) )
131132 const ipPhrase = `Your IP address is ${ data . ip } .` ;
132133 const ispPhrase = `Your network provider is ${ data . isp } .` ;
133134 const headersPhrase = `${ data . headers } .` ;
@@ -142,12 +143,6 @@ nowFetch().then(response => {
142143 document . querySelector ( '.city' ) . textContent = cityPhrase ;
143144 document . querySelector ( '.timezone' ) . textContent = timezonePhrase ;
144145 document . querySelector ( '.pin' ) . textContent = pinPhrase ;
145- bakeCookie ( data ) . then ( res => {
146- document . cookie = `monstercookie=${ res . cookie } `
147- // console.log(document.cookie)
148- const cookiePhrase = `The cookie I stored to identify you: ${ res . cookie } .` ;
149- document . querySelector ( '.cookie' ) . textContent = cookiePhrase ;
150- } )
151146 // weather
152147 weather ( data . city ) . then ( weatherData => {
153148 const weatherPhrase = `The weather of your area: ${ weatherData . description } .` ;
0 commit comments