The AiPaw Chrome extension uses chrome.runtime.sendMessage() and chrome.runtime.onMessage.addListener() for internal communication between background scripts and content/UI scripts. Below is a summary of all message types used in the project:
| Message Type | Sender Script | Listener Script | Description |
|---|---|---|---|
extract_text |
background.js |
extract_text.js |
Sent by the background script to trigger web scripting on the active page. |
save_text_file |
note.js |
background.js |
Sends generated note content to the background script to save as a .txt file. |
note |
note_generation.js |
background.js |
Sends to background.js to trigger extract_text |
window.saveURL- The system checks whether is safe URL.