|
1 | 1 | // init.js |
2 | | - |
3 | | -// Version: 1.4 |
4 | | - |
| 2 | +// Version: 1.5 |
5 | 3 | // |
6 | 4 | // Documentation: |
7 | 5 | /** |
8 | | - * This file serves as the main initializer for the ChatGPT Chrome extension. |
9 | | - * It retrieves configuration data from the service worker and identifies |
10 | | - * the active website, such as ChatGPT or Claude. Based on the site, it |
11 | | - * loads the appropriate extension scripts and applies necessary settings. |
12 | | - * The script also manages keyboard shortcuts to enhance user interaction. |
13 | | - * |
14 | | - * It monitors URL changes, especially in single-page applications, to |
15 | | - * dynamically adapt to navigation events. Resiliency checks ensure that |
16 | | - * custom modifications in the DOM are validated and reinitialized as needed. |
17 | | - * Debouncing utilities are included to limit excessive function executions |
18 | | - * and optimize performance. The initialization sequence starts automatically, |
19 | | - * ensuring the extension runs smoothly across supported platforms. |
| 6 | + * This file serves as the main initializer for the OneClickPrompts extension. |
| 7 | + * |
| 8 | + * Overview: |
| 9 | + * - Retrieves configuration data from the service worker. |
| 10 | + * - Identifies the active website (e.g., ChatGPT or Claude) and loads |
| 11 | + * the appropriate extension scripts. |
| 12 | + * - Applies necessary settings and manages keyboard shortcuts to enhance |
| 13 | + * user interaction. |
| 14 | + * - Monitors URL changes in single-page applications and ensures resiliency |
| 15 | + * by validating and reinitializing custom modifications in the DOM. |
| 16 | + * - Uses debouncing to limit excessive function executions for performance. |
20 | 17 | * |
21 | 18 | * Usage: |
22 | | - * Ensure `buttons.js` and `buttons-init.js` are loaded before this script to |
23 | | - * enable button functionalities. The script starts the initialization process |
24 | | - * automatically upon loading. |
25 | | - * |
| 19 | + * - Ensure the following scripts are loaded (in order) before this file: |
| 20 | + * 1. buttons.js |
| 21 | + * 2. buttons-init.js |
| 22 | + * 3. button-injection.js |
| 23 | + * - The initialization process starts automatically upon script load. |
| 24 | + * |
26 | 25 | * Dependencies: |
27 | | - * This file is main script, it therefore depends on all other helper files that are content scripts. Popup page scripts are separate. |
28 | | - * |
| 26 | + * - This is the main script, and it depends on all other helper files that are |
| 27 | + * used as content scripts. |
| 28 | + * - Popup page scripts are handled separately. |
| 29 | + * |
29 | 30 | */ |
| 31 | + |
30 | 32 | //Instructions for AI: do not remove comments! MUST NOT REMOVE COMMENTS. This one too! |
31 | 33 | // ALL CODE IN ALL FILES MUST USE logConCgp FOR LOGGING. NO CONSOLE LOGGING. |
32 | 34 |
|
|
0 commit comments