绕过打开链接js的限制

Bypass open links js limitation

本文关键字:js 链接      更新时间:2023-09-26

我经常需要在firefox的标签页中打开~40-50个链接。

我目前正在为此编写用户脚本,但有一个问题。Firefox不允许打开超过20个选项卡。有没有办法绕过这个限制?这是为个人使用,所以我可以改变浏览器设置,如果它可以帮助。

我有这样的代码:

$(document).ready(function(){
    if ($("article").length > 19)
    {
        alert($("article").length); 
        // show me 40, all elements have the same structure
        $("article").each(function() {
            $(this).find("a").each(function(){  
                window.open($(this).attr("href")); 
                // open only 20 tabs, no errors in console.                
            })
        });
    }                          
});

您可以更改about:config部分中允许的制表符的数量。

  • 打开新选项卡并输入about:config
  • 查找pop
  • 在列表中找到dom.popup_maximum,双击它,并编辑所需的选项卡数量。