Programmatically (or optionally) override Chrome's New Tab page

后端 未结 3 1977
旧时难觅i
旧时难觅i 2020-12-05 08:53

I\'ve written a Chrome extension that overrides the New Tab page:

manifest.json:

  \"chrome_url_overrides\": {
    \"newtab\": \"new         


        
3条回答
  •  执笔经年
    2020-12-05 09:27

    Instead of using the chrome_url_override you could write a listener that listens for when tabs update using the chrome.tabs.onUpdated.addListener(), then check if the url is chrome://newtab/ and if it is and the check box is ticked, then using chrome.tabs.update() relocate them to another page.

提交回复
热议问题