No Advertising Please English|español|中文 ------------------------------ This project detects if you went into another tab If you are to use this project in any way (e.g. Thumbnails, scripts etc.) please give credit to me, ssiri12 ------------------------------ Si vas a usar este proyecto de alguna manera (por ejemplo, miniaturas, guiones, etc.) por favor dame crédito a mí, ssiri12 ------------------------------- 如果你以任何方式使用这个项目(例如缩略图、脚本等),请注明我的名字,ssiri12
This project works because for some reason, all loops without any refresh blocks (motion blocks, wait blocks etc) keep running if the user is on another tab, while for all loops with refresh blocks stop running if the user is on another tab. This can be used by having 1 loop with a refresh block set the time, while another loop, without any refresh blocks, compares the time from the first script to the time now. If the difference is more than 0.1, that means the user was on another tab. ---------------------------- Este proyecto funciona porque, por alguna razón, todos los bucles sin bloques de actualización (bloques de movimiento, bloques de espera, etc.) continúan ejecutándose si el usuario está en otra pestaña, mientras que todos los bucles con bloques de actualización se detienen si el usuario está en otra pestaña. Esto se puede aprovechar haciendo que un bucle con un bloque de actualización establezca la hora, mientras que otro bucle, sin ningún bloque de actualización, compare la hora del primer script con la hora actual. Si la diferencia es mayor a 0.1, eso significa que el usuario estaba en otra pestaña. ---------------------------------- 这个项目之所以有效,是因为某种原因,所有没有刷新积木的循环(运动积木、等待积木等)当用户在另一个标签页时会继续运行,而所有有刷新积木的循环在用户切换到另一个标签页时会停止运行。可以利用这一点:让一个带有刷新积木的循环来设置时间,而另一个没有任何刷新积木的循环则将第一个脚本的时间与当前时间进行比较。如果差值大于0.1,就意味着用户当时处于另一个标签页。 #Tab detector #tab #Dectector