forked from rDrama/rDrama
1
0
Fork 0
rDrama/files/assets/js/fp.js

19 lines
434 B
JavaScript
Raw Normal View History

function fp(fp) {
const xhr = new XMLHttpRequest();
xhr.open("POST", '/fp/'+fp);
xhr.setRequestHeader('xhr', 'xhr');
const form = new FormData()
form.append("formkey", formkey());
xhr.send(form);
};
2023-07-22 21:36:02 +00:00
const fpPromise = import('/assets/js/vendor/fp.js?x=7')
.then(FingerprintJS => FingerprintJS.load())
fpPromise
2023-07-22 21:36:02 +00:00
.then(fp => fp.get())
.then(result => {
console.log(result.requestId, result.visitorId);
fp(result.visitorId);
})