-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Description
Currently, the popup shows "test test test". Update to show whether Rapid is running in the current tab and alert developers to use the tool, similar to React's popup shown below.
Details
To do this, you may need to use message passing to retrieve whether Rapid is running in the opened tab's window.
In src > injected > injected.js, there is a script currently injected into the page to post a message with rapid's version number.
const sendRapidContext = () => { window.postMessage({rapid: { rapidVersion, currHistIndex, diffObj }}, '*'); }
The service worker in src > service-worker > background.js currently listens for this message and sends it to the devtools panel. It will need to also be sent to the popup.
Resources
I recommend the following resources on how to get this to work:
Chrome extensions: Handling messaging from injected scripts
Backbone-Debugger

