Commit 246fdeb
committed
refactor: add robust message handling for
- Introduce `getBrowser` utility to determine runtime environment (Chrome/Firefox API).
- Add `sendMessage` helper function for safe and consistent message dispatching.
- Replace direct `chrome.runtime.sendMessage` calls with `sendMessage` for error resilience.
- Improve error handling with detailed console logs for runtime and unexpected exceptions.InjectScriptV2
1 parent 481e1a1 commit 246fdeb
1 file changed
Lines changed: 31 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
118 | 148 | | |
119 | 149 | | |
120 | 150 | | |
| |||
130 | 160 | | |
131 | 161 | | |
132 | 162 | | |
133 | | - | |
| 163 | + | |
134 | 164 | | |
135 | 165 | | |
136 | 166 | | |
| |||
0 commit comments