Open sophiathekitty opened 2 years ago
the clock loop could technically be the only interval... and the views could register as ever_minute, every_five_minute, every_ten_minutes, or every_hour... basically like the cronjobs... have them happen at like the mid point of the minute....
Use the jQuery :visible
Selector to avoid refreshing stuff that isn't visible and add some sort of hooks for having views update when switching sections or room details
if($("p").is(":visible")){
alert("The paragraph is visible.");
} else{
alert("The paragraph is hidden.");
}
use these to detect when window is focused and blurred
$(window).on('focus', function() { // your code });
$(window).on('blur', function() { // your code });
could maybe also use
$(window).focus(()=>{});
$(window).blur(()=>{});
i think i should probably see about creating some refresh loops that can be used to refresh the data in different views.
.is(:visible)
check on