What is the URL of the google chrome new tab page and how to exclude it from manifest.json

后端 未结 4 873
不思量自难忘°
不思量自难忘° 2020-12-03 19:23

I am currently building a simple google chrome extension to prank my brother. The Extension simply deletes the old page and replaces it with HTML and CSS copied off of the \

4条回答
  •  情深已故
    2020-12-03 20:22

    According to Match Patterns, chrome is not a valid scheme.

    scheme := '*' | 'http' | 'https' | 'file' | 'ftp'

    1. You could use the following exclude_matches

      "exclude_matches": ["*://*/_/chrome/newtab*"]
      
    2. You could also check if window.location.href contains chrome/newtab in you content scripts.

提交回复
热议问题