Create new window in Arc browser extension

520 Views Asked by At

Ultimate goal is to open new tabs in different windows in Arc browser (not in new tab or in 'Little Arc')

I'm currently trying to write an extension (based on "New Tab, New Window" https://chromewebstore.google.com/detail/new-tab-new-window/dndlcbaomdoggooaficldplkcmkfpgff) to work similar with "Open Link in New Window" right-click command. I'm on macOS.

Question: In chrome extension, how to open new window? The code below works in Chrome, but in Arc it opens a new Little Arc, not a new window.

import {getOption, setOption} from "./lib/option.js";

chrome.tabs.onCreated.addListener(function(tab){
    if (tab.index == 0){
        console.log('First Tab'); 
        return;
    } 
    const createData = {
        tabId: tab.id, 
        focused: true, 
        incognito: tab.incognito, 
        setSelfAsOpener: true, 
        type: "popup"
    }; 
    chrome.windows.create(createData); 
});

Note: In Arc, all windows list the same tabs, all tabs belonging to the current space. So it's enough if the extension opens a new window and activates the respective new tab in it.

0

There are 0 best solutions below