我正在开发 Chrome 插件。我想在 15 分钟内编辑信息。 它是如何工作的? setInterval 可以设置最长时间为 1 秒。我想要 15 分钟。
var i = 0;
window.setInterval(function() {
chrome.browserAction.setBadgeText({text:String(i)});
i++;
}, ( 1000 ) );`
最佳答案
Use the chrome.alarms API to schedule code to run periodically or at a specified time in the future.
关于javascript - chrome 扩展程序会定期检查来自服务器的数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18958022/