added noindex for robots

This commit is contained in:
Adrian Rosin 2024-02-09 09:49:22 +01:00
parent 013f315c50
commit 0c3e79cd94
2 changed files with 5 additions and 5 deletions

View file

@ -7,6 +7,7 @@
-->
<html lang="fr">
<head>
<meta name="robots" content="noindex">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src 'self'; script-src 'self'; style-src 'self'">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, height=device-height, minimum-scale=1.0">

View file

@ -116,10 +116,10 @@ async function setupPage() {
}
let lastScrollTop = 0;
let isScrolling = false;
let isCallbackRegistered = false;
window.addEventListener("scroll", function() {
if (!isScrolling) {
if (!isCallbackRegistered) {
window.requestAnimationFrame(function() {
let currentPosition = window.scrollY || document.documentElement.scrollTop;
const toggleButton = document.querySelectorAll('.toggleButton');
@ -135,12 +135,11 @@ async function setupPage() {
button.style.display = "block";
});
}
lastScrollTop = currentPosition <= 0 ? 0 : currentPosition; // For Mobile or negative scrolling
isScrolling = false;
isCallbackRegistered = false;
});
isScrolling = true;
isCallbackRegistered = true;
}
});
}