Skip to content

Instantly share code, notes, and snippets.

@diericx
Created November 6, 2019 18:19
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 diericx/6693cfecdf679679216d794961113c62 to your computer and use it in GitHub Desktop.
Save diericx/6693cfecdf679679216d794961113c62 to your computer and use it in GitHub Desktop.
fetch('//cdn.jsdelivr.net/npm/fingerprintjs2@v2.1.0/dist/fingerprint2.min.js')
.then(response => response.text())
.then(text => eval(text))
.then(() => {
Fingerprint2.get(function (components) {
console.log(components) // an array of components: {key: ..., value: ...}
var values = components.map(function (component) { return component.value })
var murmur = Fingerprint2.x64hash128(values.join(''), 31)
console.log(murmur)
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment