forked from rDrama/rDrama
gMerge branch 'master' of https://github.com/Aevann1/Drama
commit
782ae1b48a
|
@ -7,30 +7,32 @@
|
||||||
<iframe width="0" height="0" src="https://www.youtube.com/embed/A2o15RCtSS0?rel=0&controls=0&showinfo=0&autoplay=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
<iframe width="0" height="0" src="https://www.youtube.com/embed/A2o15RCtSS0?rel=0&controls=0&showinfo=0&autoplay=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script>
|
{% if not v.fp %}
|
||||||
function fp(fp) {
|
<script>
|
||||||
var xhr = new XMLHttpRequest();
|
function fp(fp) {
|
||||||
xhr.open("POST", '{{request.host_url}}fp/'+fp, true);
|
var xhr = new XMLHttpRequest();
|
||||||
var form = new FormData()
|
xhr.open("POST", '{{request.host_url}}fp/'+fp, true);
|
||||||
form.append("formkey", formkey());
|
var form = new FormData()
|
||||||
xhr.withCredentials=true;
|
form.append("formkey", formkey());
|
||||||
xhr.send(form);
|
xhr.withCredentials=true;
|
||||||
};
|
xhr.send(form);
|
||||||
|
};
|
||||||
|
|
||||||
const fpPromise = new Promise((resolve, reject) => {
|
const fpPromise = new Promise((resolve, reject) => {
|
||||||
const script = document.createElement('script');
|
const script = document.createElement('script');
|
||||||
script.onload = resolve;
|
script.onload = resolve;
|
||||||
script.onerror = reject;
|
script.onerror = reject;
|
||||||
script.async = true;
|
script.async = true;
|
||||||
script.src = 'https://cdn.jsdelivr.net/npm/@fingerprintjs/fingerprintjs-pro@3/dist/fp.min.js';
|
script.src = 'https://cdn.jsdelivr.net/npm/@fingerprintjs/fingerprintjs-pro@3/dist/fp.min.js';
|
||||||
document.head.appendChild(script);
|
document.head.appendChild(script);
|
||||||
})
|
})
|
||||||
.then(() => FingerprintJS.load({token: '{{environ.get("FP")}}'}));
|
.then(() => FingerprintJS.load({token: '{{environ.get("FP")}}'}));
|
||||||
|
|
||||||
fpPromise
|
fpPromise
|
||||||
.then(fp => fp.get())
|
.then(fp => fp.get())
|
||||||
.then(result => {if (result.visitorId != '{{v.fp}}') fp(result.visitorId);})
|
.then(result => {if (result.visitorId != '{{v.fp}}') fp(result.visitorId);})
|
||||||
</script>
|
</script>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="row" style="overflow: visible;padding-top:5px;">
|
<div class="row" style="overflow: visible;padding-top:5px;">
|
||||||
|
|
Loading…
Reference in New Issue