Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的问题很简单。我目前正在开发一个谷歌浏览器扩展,我想知道如何重新加载所有页面。我必须使用 chrome API 或 jquery API 吗?
这是仅使用背景页面的更简单的解决方案:
chrome.tabs.getAllInWindow(null, function(tabs) { for(var i = 0; i < tabs.length; i++) { chrome.tabs.update(tabs[i].id, {url: tabs[i].url}); } });