讨论 » 创建请求

⭐Automatic page refresh Don't reset the time or reload in the meantime if the page is in operation

§
发布于:2022-08-31
编辑于:2022-08-31

(function myloop(i) {
setTimeout(function() {
myfunc();
if (--i) myloop(i);
},150000)
})(1);

function myfunc() {
window.location.reload(true);}

var myp = document.createElement("p");
myp.textContent = "Last update: " + (new Date()).toString();
$("#top").append(myp);

❶How to stop reloading if you are working on that page (To avoid reloading the moment you release it, continue to ❷)
❷Add seconds to reload or reset the number of seconds when operating the

Is this possible? Please help me with this.
I am thinking of something suitable for updating news sites etc.

§
发布于:2022-09-01

Stop counting if you touch the mouse/keyboard/wheel and add 1 second if you perform an operation.

Javascript here was presented by a volunteer and this proposal and request has been resolved.

Thank you very much.

发布留言

登录(不可用)以发布留言。

长期地址
遇到问题?请前往 GitHub 提 Issues。