Could I make a Google Chrome extension for chrome pages (downloads, extensions etc)?

后端 未结 3 1571
难免孤独
难免孤独 2020-12-19 20:29

I\'d like to make a very simple extensions that slightly alters how the Downloads page looks. Changing the History page might be interesting too, but that\'s for later.

3条回答
  •  别那么骄傲
    2020-12-19 21:13

    According to this documentation, chrome:// URLs are an invalid scheme so they won't be matched:

    A match pattern is essentially a URL that begins with a permitted scheme (http, https, file, or ftp), and that can contain '*' characters.

    I would look into using override pages instead.


    As requested, here's my extension that can at least load when chrome://downloads is loaded, although as I said, I don't think you can modify the page even if you know that's the page you're viewing.

    manifest.json

    {
        "name": "Test",
        "version": "0.0.1",
        "background_page": "background.html",
        "permissions": [
            "tabs"
        ]
    }
    

    background.html

    
    

提交回复
热议问题