MCPcopy
hub / github.com/Tampermonkey/tampermonkey / determineScriptsToRun

Function determineScriptsToRun

src/background.js:3681–3710  ·  view source on GitHub ↗
(href)

Source from the content-addressed store, hash-verified

3679}
3680
3681var determineScriptsToRun = function(href) {
3682 var names = getAllScriptNames();
3683 var ret = [];
3684
3685 if (D || V) console.log("determineScriptsToRun @" + href);
3686
3687 for (var k in names) {
3688 var n = names[k];
3689
3690 if (href) {
3691 var cond = TM_storage.getValue(n + condAppendix, null);
3692
3693 if (!cond) continue;
3694 if (!validUrl(href, cond, n)) {
3695 continue;
3696 }
3697 }
3698
3699 var r = loadScriptByName(n);
3700 if (!r.script || !r.cond) {
3701 console.log("fatal error (" + n + ")!!!");
3702 continue;
3703 }
3704
3705 if (V) console.log("bg: determineScriptsToRun: found script " + n);
3706 ret.push(r.script);
3707 }
3708
3709 return sortScripts(ret);
3710};
3711
3712/* ###### Storage ####### */
3713

Callers 4

background.jsFile · 0.85
reorderScriptsFunction · 0.85
itFunction · 0.85
convertMgmtToMenuItemsFunction · 0.85

Calls 4

getAllScriptNamesFunction · 0.85
validUrlFunction · 0.85
loadScriptByNameFunction · 0.85
sortScriptsFunction · 0.70

Tested by 1

itFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…