gpt4 book ai didi

tabs - 通过 chrome.tabs.create 打开多个选项卡时出现问题

转载 作者:行者123 更新时间:2023-12-05 08:01:45 26 4
gpt4 key购买 nike

我在使用 chrome.tabs.create 方法打开多个选项卡时遇到问题。我正在尝试使用 chrome.tabs.create 循环打开大约 9 个选项卡,但打开的选项卡数量仅限于 4 个。看起来循环在选项卡实际创建之前很早就结束了。

假设我能够在 links_array 变量中获取所有要打开的链接。我应该如何创建允许打开每个选项卡的 JavaScript 同步回调。

我可能猜错了确切的问题,但很高兴知道,如果我没有发现这个谜题中遗漏的东西。

Edit: Chrome Extensions have been restricted to open not more than 3 or 4 tabs in a single click(as found through many other questions), but there has been no such official statement from the Chrome Extension Devs, regarding this situation.

最佳答案

也许您必须为 chrome.tabs.onCreated 添加监听器background.js 中的事件和回调函数调用下一个选项卡的创建方法?但要小心无限循环。

关于tabs - 通过 chrome.tabs.create 打开多个选项卡时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12333773/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com