9 lines
316 B
Plaintext
9 lines
316 B
Plaintext
<script>
|
|
const d = ['mousemove', 'touchstart', 'scroll', 'wheel', 'keydown', 'keyup'];
|
|
const ping = () => {
|
|
fetch(`/science?url=${encodeURIComponent(location.href)}`);
|
|
d.forEach(e => window.removeEventListener(e, ping));
|
|
}
|
|
d.forEach(e => window.addEventListener(e, ping));
|
|
</script>
|