Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

README.md 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Chrome Extension
  2. ```
  3. chrome-extension/
  4. ├── manifest.json         # Main configuration file for the extension
  5. ├── popup.html          # Main user interface of the extension
  6. ├── popup.js            # Script for the main interface
  7. ├── background.js       # Background script for the extension
  8. ├── content.js          # Script to interact with web pages
  9. ├── styles/
  10. │   └── popup.css       # CSS file for the popup
  11. ├── icons/
  12. │   ├── icon16.png      # 16x16 pixel icon
  13. │   ├── icon48.png      # 48x48 pixel icon
  14. │   └── icon128.png     # 128x128 pixel icon
  15. ├── assets/
  16. │   └── ...             # Directory for other assets (images, fonts, etc.)
  17. ├── scripts/
  18. │   ├── utils.js        # File containing utility functions
  19. │   └── api.js          # File containing API call logic
  20. └── README.md           # Instructions for using and installing the extension
  21. ```
  22. # Installation
  23. 1. Open chrome://extensions/.
  24. 2. Enable Developer mode.
  25. 3. Click Load unpacked and select the project directory.
  26. # Features
  27. 1. Interact with web pages.
  28. 2. Run in the background to handle logic.
  29. # Usage
  30. - Click the extension icon in the toolbar.
  31. - Follow the instructions in the interface.
  32. # Additional Notes
  33. - **manifest.json**: This file is crucial as it defines the extension's metadata, permissions, and entry points.
  34. - **background.js**: This script runs independently of any web page and can perform tasks such as listening for browser events, making network requests, and storing data.
  35. - **content.js**: This script injects code into web pages to manipulate the DOM, modify styles, or communicate with the background script.
  36. - **popup.html/popup.js**: These files create the popup that appears when the user clicks the extension icon.
  37. icons: These icons are used to represent the extension in the browser's UI.
  38. More Detailed Explanation
  39. - **manifest.json**: Specifies the extension's name, version, permissions, and other details. It also defines the entry points for the background script, content scripts, and the popup.
  40. - **background.js**: Handles tasks that need to run continuously, such as syncing data, listening for browser events, or controlling the extension's behavior.
  41. - **content.js**: Interacts directly with the web page's DOM, allowing you to modify the content, style, or behavior of the page.
  42. - **popup.html/popup.js**: Creates a user interface that allows users to interact with the extension.
  43. Other files: These files can contain additional scripts, styles, or assets that are used by the extension.