M
M
Mikhail2017-07-17 13:15:13
JavaScript
Mikhail, 2017-07-17 13:15:13

How to run a script on every page (Google extension)?

Good afternoon, ladies and gentlemen! I need my script (JS) to run on every page, but I don't understand how to include it in the extension, what should the manifest file be?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yunus Gaziev, 2017-07-17
@TheMaxai

If for personal purposes, then you can use this extension Custom JavaScript for websites
And here is an example for the manifest

{
  "content_scripts": [
    {
      "matches": ["http://www.google.com/*"],
      "js": ["myscript.js"]
    }
  ],
  "permissions": [
     "tabs", "http://*/*"
  ]
}

And here is the instruction from Google

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question