Open multiple links in Chrome at once as new tabs

前端 未结 7 1577
小蘑菇
小蘑菇 2020-11-29 09:32

I\'m trying to open multiple links at once in Google Chrome in new tabs but it fails.

Problems:

  1. Blocked by popup
  2. Open in new windows instead o
7条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-29 10:09

    The reason that the browser extension can do it is because Chrome extensions have access to a special Chrome API, which lets you use:

    chrome.windows.create({tabid: n})
    

    where createData has a tabid value greater than any current tab (and you can find the greatest current tabid using chrome.windows.getAll()).

    However, in terms of doing it on your page (or anywhere that's not a Chrome extension), that's not possible, since whether or not a new window opens in a new tab is determined entirely by the user's settings.

提交回复
热议问题