Commit c047325
fix(kwai): Allow concurrent observation of chat and feed
Previously, the Kwai integration utilized a single `MutationObserver` instance
to monitor both chat comments and feed events. This could lead to issues
where only one type of event was reliably observed or where the observer
was unnecessarily reset.
This change introduces dedicated `MutationObserver` instances for Kwai chat
(`info-chat-comment`) and feed (`info-feed-list`) containers in `sources/kwai.js`.
- Replaced single `observer` and `isWatching` variables with `chatObserver` and `feedObserver`.
- Ensures both chat messages and feed events are continuously monitored without conflict.
- Improves reliability and efficiency of Kwai event processing, building on recent Kwai support.
[auto-enhanced]1 parent 5a995d3 commit c047325
1 file changed
+38
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
207 | 196 | | |
208 | 197 | | |
209 | 198 | | |
210 | 199 | | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
216 | 209 | | |
217 | 210 | | |
218 | 211 | | |
219 | | - | |
220 | 212 | | |
221 | 213 | | |
222 | 214 | | |
| |||
227 | 219 | | |
228 | 220 | | |
229 | 221 | | |
230 | | - | |
| 222 | + | |
231 | 223 | | |
232 | 224 | | |
233 | | - | |
234 | | - | |
| 225 | + | |
| 226 | + | |
235 | 227 | | |
236 | | - | |
237 | | - | |
238 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
239 | 234 | | |
240 | | - | |
241 | | - | |
242 | 235 | | |
243 | 236 | | |
244 | 237 | | |
| |||
281 | 274 | | |
282 | 275 | | |
283 | 276 | | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
290 | 283 | | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
295 | 290 | | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
303 | 296 | | |
304 | 297 | | |
305 | 298 | | |
0 commit comments