chrome 浏览器插件右键打开窗口并获取tabid

 

chrome.contextMenus.create({
    title: "Open frame in new tab",
    onclick: function(info, tab){
        chrome.tabs.create({
            url: info.frameUrl || info.pageUrl,
            index: tab.index + 1,
            selected: true
        });
    }
});

 

转自:https://www.cnblogs.com/sohighthesky/archive/2011/04/14/open-frame-in-new-tab.html

posted @ 2023-02-03 10:50  util6  阅读(381)  评论(0编辑  收藏  举报