leonvogt / hotwire-dev-tools

Browser Dev Tools for Turbo and Stimulus
MIT License
184 stars 4 forks source link

inject.js got injected on all WebSites, no matter if "Show Panel" is toggled or not #44

Closed lirtistan closed 3 months ago

lirtistan commented 3 months ago

Hi,

seems inject.js got inject on all Sites by default, iam not sure if this is intentionally. Other plugins eg. Livereload inject things on user action, not by default.

Affected version: 0.2.1 (Screenshots where made within version 0.2.0, but issue still exist)

Screenshot from 2024-06-13 07-34-50

Screenshot from 2024-06-13 07-36-13

leonvogt commented 3 months ago

Hi @lirtistan, yes that's a good point.
We don't really need to inject the script, when the detail panel isn't open.

When I look at your screenshot, I'm also wondering if we should rename it to something more explicit like "hotwire_dev_tools_inject_script.js".
So it's easier to spot from where the script is coming from.