討論 » 建立請求

⭐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。