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

16 lines
380 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:49:40 +00:00
const fpPromise = import('/assets/js/vendor/fp.js?x=8')
2023-07-22 21:36:02 +00:00
.then(FingerprintJS => FingerprintJS.load())
fpPromise
2023-07-22 21:36:02 +00:00
.then(fp => fp.get())
2023-07-22 21:41:07 +00:00
.then(result => {fp(result.visitorId)})