<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body style="height: 3000px">
<script>
onscroll = function(){
var scrollHeight = Math.max(
document.body.scrollHeight, document.documentElement.scrollHeight,
document.body.offsetHeight, document.documentElement.offsetHeight,
document.body.clientHeight, document.documentElement.clientHeight
);
console.log(window.scrollY - scrollHeight + innerHeight) ;
};
</script>
</body>
</html>
рони, какая цифра последняя?