accessing the current html page from chrome extension

后端 未结 4 1725
一向
一向 2021-01-01 19:28

I\'m new to chrome extensions. I would like to create a simple chrome extension that popup an alert with the title of the current html page. when I\'m performing: ale

4条回答
  •  抹茶落季
    2021-01-01 20:00

    You can use the tabs module:

    chrome.tabs.getCurrent(function(tab) {
        alert(tab.title);
    });
    

提交回复
热议问题