stable final 20211111

This commit is contained in:
2021-11-11 16:52:08 +01:00
parent d5108d0408
commit b60db5703b
2 changed files with 44 additions and 54 deletions
+9 -18
View File
@@ -22,6 +22,9 @@
<script src="js/blockexplorer.js" defer></script>
<script>
var lastScroll = 0;
$(document).ready(function(){
// Mask navigator scrollbar
// Doesn't work : can't scroll anymore
@@ -37,13 +40,10 @@
});
$(window).scroll(function() {
var element = document.getElementById('blockchain');
var offset = element.getBoundingClientRect().top - element.offsetParent.getBoundingClientRect().top;
const top = window.pageYOffset + window.innerHeight - offset;
if (top === element.scrollHeight) {
console.log("bottom");
blockchainExplorer.addBottomBlock();
if ( window.scrollY > (2200+lastScroll))
{
lastScroll = window.scrollY;
blockchainExplorer.addBottomBlock();
}
});
@@ -51,19 +51,10 @@
});
var isInViewport = function (elem) {
var bounding = elem.getBoundingClientRect();
return (
bounding.top >= 0 &&
bounding.left >= 0 &&
bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
bounding.right <= (window.innerWidth || document.documentElement.clientWidth)
);
};
function showInfos()
{
blockchainExplorer.init(parseInt($('#mode_selector').val()));
lastScroll = 0;
blockchainExplorer.init(parseInt($('#mode_selector').val()), document.getElementById("mode_checkbox").checked);
}
function toggleInfos()