stable final 20211111
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user