Skip to content

Commit fddc2e7

Browse files
committed
touch event
1 parent f54bb23 commit fddc2e7

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

client/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ <h1>EPIC_Tracker</h1>
2424
<span class="depth"></span><br>
2525
<span class="dimentions"></span><br>
2626
<span class="graphics"></span><br>
27+
<span class="touch"></span><br>
2728
<br>
2829
<span class="country"></span><br>
2930
<span class="ip"></span><br>

client/index.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ const language = navigator.language;
55
const deviceWidth = screen.availWidth;
66
const deviceHeight = screen.availHeight;
77
const colorDepth = screen.colorDepth;
8-
8+
let touchPoints = navigator.maxTouchPoints;
9+
let touchSupport;
910
// Phrases
1011
const memeoryPhrase = `Your device memory [RAM] is around ${memory} GB.`;
12+
if (touchPoints > 1) {touchSupport = true}
13+
else {touchSupport = false}
14+
const touchPhrase = `Touch screen support: ${touchSupport}`
1115
const platformPhrase = `You are possibly running: ${platform}.`;
1216
const hardwareConcurrencyPhrase = `You have ${hardwareConcurrency} logical processor cores running.`;
1317
const languagePhrase = `Your device language is ${language}.`;
@@ -23,6 +27,7 @@ document.querySelector('.con').textContent = hardwareConcurrencyPhrase;
2327
document.querySelector('.lang').textContent = languagePhrase;
2428
document.querySelector('.depth').textContent = colorDepthPhrase;
2529
document.querySelector('.dimentions').textContent = dimentionPhrase;
30+
document.querySelector('.touch').textContent = touchPhrase
2631

2732
// Try to get the graphichal processing unit info
2833
const canv = document.getElementById("canv");
@@ -142,8 +147,8 @@ nowFetch().then(response => {
142147
deviceHeight: deviceHeight, language: language, colorDepth: colorDepth, isp: data.isp
143148
}
144149

145-
const encodedDinamic = btoa(JSON.stringify(dynamicData))
146-
const HASH = sha1(encodedDinamic)
150+
const encodedDynamic = btoa(JSON.stringify(dynamicData))
151+
const HASH = sha1(encodedDynamic)
147152
console.log("HASH:" + HASH)
148153
const hashPhrase = `Your identity HASH: ${HASH}`
149154
const ipPhrase = `Your IP address is ${data.ip}.`;

0 commit comments

Comments
 (0)