Skip to content

Commit

Permalink
Improve
Browse files Browse the repository at this point in the history
  • Loading branch information
JeherillaJanwar committed Apr 5, 2024
1 parent cb7f752 commit 35b211a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions JS/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var getIP;
let getIP;
let typed = "";
const element = document.querySelector(".typity");

Expand Down Expand Up @@ -71,16 +71,19 @@ const isIPadDevice = isIpad(userAgent);
function getIP(json) {
const data = {
ip: json.ip,
desktop_device: !DetectRTC.isMobileDevice && !isTabletDevice && !isIPadDevice,
desktop_device:
!DetectRTC.isMobileDevice && !isTabletDevice && !isIPadDevice,
mobile_device: DetectRTC.isMobileDevice,
tablet_device: isTabletDevice,
ipad_pro_device: isIPadDevice,
os: DetectRTC.osName,
os_version: DetectRTC.osVersion,
isChrome: DetectRTC.browser.isChrome,
isPrivateBrowsing: DetectRTC.browser.isPrivateBrowsing,
browser: DetectRTC.browser.name,
browser_version: DetectRTC.browser.version,
browser_version: DetectRTC.browser.fullVersion,
user_agent: userAgent,
}
};
notifyRobot(data);
}

Expand Down Expand Up @@ -183,4 +186,4 @@ function isTablet(userAgent) {

function isIpad(userAgent) {
return /macintosh/.test(userAgent) && "ontouchend" in document;
}
}

0 comments on commit 35b211a

Please sign in to comment.