Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ To avoid any additional installs you may just add `data-config="inpage:true"` at
></script>
```

Also you can toggle React Render Tracker panel with:
- shortcut `Alt + Meta (Command / Win) + T`
- `data-config="isactive:false"` option

### Option #1 – Using with browser's devtools

1. Install Rempl extension [for Chromium](https://chrome.google.com/webstore/detail/rempl/hcikjlholajopgbgfmmlbmifdfbkijdj) based browser or [for Firefox](https://addons.mozilla.org/en-US/firefox/addon/rempl/) (other browsers might be added later)
Expand Down
17 changes: 16 additions & 1 deletion src/publisher/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,20 @@ import { attach } from "./react-integration";
installReactDevtoolsHook(window, renderer => attach(renderer, recordEvent));

if (config.inpage) {
rempl.getHost().activate();
const host = rempl.getHost();
let isActive = config.isactive ?? true

const toggle = () => {
isActive = !isActive;
isActive ? host.deactivate() : host.activate();
}
toggle()

document.addEventListener('keydown', event => {
if (event.metaKey === true &&
event.altKey === true &&
event.code === 'KeyT') {
toggle()
}
})
}