Permalink
Browse files

Rather than hide cursor always, timeout and show on move

  • Loading branch information...
NEMS Linux
NEMS Linux committed Nov 4, 2018
1 parent 115430c commit 2e9f7aee8a671dd5cc4bff783abf583f39efa27d
Showing with 37 additions and 1 deletion.
  1. +37 −0 tv/index.php
  2. +0 −1 tv/nagios.css
@@ -103,6 +103,43 @@ function updateCountDown(){
"/img/wallpaper/server_room_dark.jpg",
], {duration: 10000,transition: 'fade',speed: '1000'});
$(function() {
var timer;
var fadeInBuffer = false;
$(document).mousemove(function() {
if (!fadeInBuffer) {
if (timer) {
console.log("clearTimer");
clearTimeout(timer);
timer = 0;
}
console.log("fadeIn");
$('html').css({
cursor: ''
});
} else {
$('body').css({
cursor: 'default'
});
fadeInBuffer = false;
}
timer = setTimeout(function() {
console.log("fadeout");
$('body').css({
cursor: 'none'
});
fadeInBuffer = true;
}, 1000)
});
$('body').css({
cursor: 'default'
});
});
});
</script>

@@ -11,7 +11,6 @@ body {
background: #404040;
padding: .5em 1em;
margin-bottom: 65px;
cursor: none;
}

table {

0 comments on commit 2e9f7ae

Please sign in to comment.