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'))
|
||||
})
|
||||
|
||||
window.addEventListener('blur', function(){
|
||||
addEventListener('blur', function(){
|
||||
focused=false
|
||||
})
|
||||
window.addEventListener('focus', function(){
|
||||
addEventListener('focus', function(){
|
||||
focused=true
|
||||
})
|
||||
|
||||
|
|
|
@ -5,13 +5,13 @@ if (standalone) {
|
|||
const thresholdImg = "/e/marseythumbsup.webp";
|
||||
const threshold = -100;
|
||||
|
||||
window.addEventListener("touchend", () => {
|
||||
addEventListener("touchend", () => {
|
||||
if (window.scrollY < threshold) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
window.addEventListener("scroll", () => {
|
||||
addEventListener("scroll", () => {
|
||||
img.setAttribute("src", window.scrollY < threshold ? thresholdImg : defaultImg);
|
||||
});
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue