0 points

javascript - Chrome Extension - Simple Content Script for running js on any page - Stack Overflow


dashboard

Fri Aug 28 2020 13:07:47 GMT+0000 (UTC)

Posted by @surajrane45 #javascript

{
    "name": "Highlight some phrases",
    "description": "Hightlight some pre defined text after page loads",
    "version": "0.1",
    "permissions": [
        "tabs","<all_urls>"
    ],
    "browser_action": {
        "default_icon": "icon.png"
    },
    "content_scripts": [
        {
        "matches": [
            "http://*/*",
            "https://*/*"
            ],
        "js": ["content.js"],
        "run_at": "document_end"    // Pay attention to this line
        }
    ], 
    "manifest_version": 2
}
content_copy Copy

https://stackoverflow.com/questions/19347499/chrome-extension-simple-content-script-for-running-js-on-any-page