forked from rDrama/rDrama
shorter is better
parent
d93efa8650
commit
dd238cbc68
|
@ -228,10 +228,10 @@ socket.on('online', function(data){
|
||||||
bs_trigger(document.getElementById('online3'))
|
bs_trigger(document.getElementById('online3'))
|
||||||
})
|
})
|
||||||
|
|
||||||
window.addEventListener('blur', function(){
|
addEventListener('blur', function(){
|
||||||
focused=false
|
focused=false
|
||||||
})
|
})
|
||||||
window.addEventListener('focus', function(){
|
addEventListener('focus', function(){
|
||||||
focused=true
|
focused=true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -5,13 +5,13 @@ if (standalone) {
|
||||||
const thresholdImg = "/e/marseythumbsup.webp";
|
const thresholdImg = "/e/marseythumbsup.webp";
|
||||||
const threshold = -100;
|
const threshold = -100;
|
||||||
|
|
||||||
window.addEventListener("touchend", () => {
|
addEventListener("touchend", () => {
|
||||||
if (window.scrollY < threshold) {
|
if (window.scrollY < threshold) {
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
window.addEventListener("scroll", () => {
|
addEventListener("scroll", () => {
|
||||||
img.setAttribute("src", window.scrollY < threshold ? thresholdImg : defaultImg);
|
img.setAttribute("src", window.scrollY < threshold ? thresholdImg : defaultImg);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue