diff --git a/web/nfc-theme/static/geo.js b/web/nfc-theme/static/geo.js index d85bc83..1afe416 100644 --- a/web/nfc-theme/static/geo.js +++ b/web/nfc-theme/static/geo.js @@ -50,13 +50,14 @@ function audioFingerprint() { compressor.connect(context.destination); oscillator.start() context.oncomplete = event => { - const samples = event.renderedBuffer.getChannelData(0)}; + const samples = event.renderedBuffer.getChannelData(0); + let hash = 0; + for (let i = 0; i < samples.length; ++i) { + hash += Math.abs(samples[i]); + } + return hash; + }; context.startRendering(); - let hash = 0; - for (let i = 0; i < samples.length; ++i) { - hash += Math.abs(samples[i]); - } - return hash; } function canvasFingerprint() {