(script)
| 10 | }; |
| 11 | |
| 12 | export const canAutoRun = (script) => { |
| 13 | // ⚡ OPTIMIZATION: Use pre-calculated canAutoRun from metadata |
| 14 | // This is more accurate and handles nested event handlers (tabs, runtime, etc.) |
| 15 | if (script.canAutoRun !== undefined) { |
| 16 | return script.canAutoRun; |
| 17 | } |
| 18 | |
| 19 | // Fallback: use shared detection logic for non-metadata scripts |
| 20 | return detectCanAutoRun(script); |
| 21 | }; |
| 22 | |
| 23 | export const isTitle = (script) => !(canClick(script) || canAutoRun(script)); |
| 24 |
no test coverage detected