This example demonstrates how to display the side panel only on google.com using the Side Panel API and Storage API and Notification API. It allows users to open the side panel by clicking on the action icon which is site-specific.
- Pass textarea by row to content page textboxes by one button via storage.local and chrome.tabs.sendMessage.
- Contentscript include conditional examining data to take different action
- Contentscript send message to service worker to trigger notification when complete via chrome.runtime.sendMessage.
sequenceDiagram
Sidepanel Textarea->+Content Page: chrome.tabs.sendMessage
Note right of Sidepanel Textarea: Storage.local
Content Page--> -Service Worker: chrome.runtime.sendMessage
Note right of Content Page: Complete!<br/>Trigger notification
- Clone this repository.
- Load this directory in Chrome as an unpacked extension.
- Pin the extension.
- Go to https://www.google.com.
- Click on the action icon to open the side panel.