Skip to content

Instantly share code, notes, and snippets.

@efernandesng
Last active January 22, 2019 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save efernandesng/6ed34bfb31649c4c23e329397aae5cf1 to your computer and use it in GitHub Desktop.
Save efernandesng/6ed34bfb31649c4c23e329397aae5cf1 to your computer and use it in GitHub Desktop.
JS User Information
var info={
timeOpened:new Date(),
timezone:(new Date()).getTimezoneOffset()/60,
pageon(){return window.location.pathname},
referrer(){return document.referrer},
previousSites(){return history.length},
browserName(){return navigator.appName},
browserEngine(){return navigator.product},
browserVersion1a(){return navigator.appVersion},
browserVersion1b(){return navigator.userAgent},
browserLanguage(){return navigator.language},
browserOnline(){return navigator.onLine},
browserPlatform(){return navigator.platform},
javaEnabled(){return navigator.javaEnabled()},
dataCookiesEnabled(){return navigator.cookieEnabled},
dataCookies1(){return document.cookie},
dataCookies2(){return decodeURIComponent(document.cookie.split(";"))},
dataStorage(){return localStorage},
sizeScreenW(){return screen.width},
sizeScreenH(){return screen.height},
sizeDocW(){return document.width},
sizeDocH(){return document.height},
sizeInW(){return innerWidth},
sizeInH(){return innerHeight},
sizeAvailW(){return screen.availWidth},
sizeAvailH(){return screen.availHeight},
scrColorDepth(){return screen.colorDepth},
scrPixelDepth(){return screen.pixelDepth},
latitude(){return position.coords.latitude},
longitude(){return position.coords.longitude},
accuracy(){return position.coords.accuracy},
altitude(){return position.coords.altitude},
altitudeAccuracy(){return position.coords.altitudeAccuracy},
heading(){return position.coords.heading},
speed(){return position.coords.speed},
timestamp(){return position.timestamp},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment