misc
This commit is contained in:
@ -62,11 +62,12 @@
|
||||
|
||||
// <scroller>
|
||||
let tts = 0;
|
||||
const scroll_treshold = 1;
|
||||
if(document.querySelector("div#posts")) {
|
||||
document.addEventListener("wheel", e => {
|
||||
if((window.innerHeight + window.scrollY) >= document.body.offsetHeight && e.deltaY > 0) { // down
|
||||
if(elem = document.querySelector(".pagination > .next:not(.disabled)")) {
|
||||
if(tts < 2) {
|
||||
if(tts < scroll_treshold) {
|
||||
document.querySelector("div#footbar").style.backgroundColor = "var(--scroller-bg)";
|
||||
tts++;
|
||||
}
|
||||
@ -76,7 +77,7 @@
|
||||
}
|
||||
else if(window.scrollY <= 0 && e.deltaY < 0) { // up
|
||||
if(elem = document.querySelector(".pagination > .prev:not(.disabled)")) {
|
||||
if(tts < 2) {
|
||||
if(tts < scroll_treshold) {
|
||||
document.querySelector("nav.navbar").style.backgroundColor = "var(--scroller-bg)";
|
||||
tts++;
|
||||
}
|
||||
@ -85,6 +86,7 @@
|
||||
}
|
||||
}
|
||||
else {
|
||||
tts = 0;
|
||||
document.querySelector("div#footbar").style.backgroundColor = "var(--nav-bg)";
|
||||
document.querySelector("nav.navbar").style.backgroundColor = "var(--nav-bg)";
|
||||
}
|
||||
|
Reference in New Issue
Block a user