Skip to content

Instantly share code, notes, and snippets.

@jwalsh
Created June 6, 2013 22:52
Show Gist options
  • Save jwalsh/5725665 to your computer and use it in GitHub Desktop.
Save jwalsh/5725665 to your computer and use it in GitHub Desktop.
window.bkmt = [ navigator.userAgent,
'',
navigator.language,
document.defaultCharset,
(new Date()).getTime(),
screen.width,
screen.height,
screen.colorDepth,
(new Date()).getTimezoneOffset(),
(new Date()).toLocaleString(),
(function(f) { var p = navigator.plugins; for (var i = 0 ; i < p.length; i++) { if (p[i].name.indexOf(f) !== -1) { return p[i].description; }; } })('Shockwave Flash'),
(function(f) { var p = navigator.plugins; for (var i = 0 ; i < p.length; i++) { if (p[i].name.indexOf(f) !== -1) { return p[i].description; }; } })('QuickTime')
];
var lookup = [ 'A complete user agent string',
'IP address',
'Navigator language',
'Navigator encoding',
'Timestamp of the visit',
'Screen width',
'Screen height',
'Screen depth',
'Timezone offset',
'Date.toLocaleString()',
'Flash plugin information',
'Quicktime plugin information'];
bkmt
.forEach(
function(e, i, c) {
console.log(lookup[i], ':', bkmt[i]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment