Chrome Extensions: I have a question about execution on the body page.

Asked 1 years ago, Updated 1 years ago, 83 views

Hi, everyone. I'm a beginner in programming.

I'm going to make a chrome extension program as a practice. Clicking on the Google Results icon will only provide examples of how it works on the pop-up page. I want to make it work on the body page of the tab when I press the icon. Please let me know if this function is possible, and if possible, which part of the manifest.json file should I touch.

Thank you.

google-chrome chrome-extension

2022-09-21 19:28

1 Answers

Take a look at the Event Pages feature provided by Chrome Extensions.

You can create and use manifest as follows:

{
  "name": "My extension",
  ...
  "background": {
    "scripts": ["eventPage.js"],
    "persistent": false
  },
  ...
}

Many samples related to chrome extensions are available in GitHub, so please find the code for the project similar to the program you want to create.


2022-09-21 19:28

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.