MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / canAutoRun

Function canAutoRun

popup/helpers/utils.js:12–21  ·  view source on GitHub ↗
(script)

Source from the content-addressed store, hash-verified

10};
11
12export 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
23export const isTitle = (script) => !(canClick(script) || canAutoRun(script));
24

Callers 3

createScriptButtonFunction · 0.90
refreshSpecialTabsFunction · 0.90
isTitleFunction · 0.85

Calls 1

detectCanAutoRunFunction · 0.90

Tested by

no test coverage detected