MCPcopy Index your code
hub / github.com/Tampermonkey/tampermonkey / determineLastScriptPosition

Function determineLastScriptPosition

src/background.js:3566–3581  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3564trup = ScriptUpdater;
3565
3566var determineLastScriptPosition = function() {
3567 var names = getAllScriptNames();
3568 var pos = 0;
3569 for (var k in names) {
3570 var n = names[k];
3571 var r = loadScriptByName(n);
3572 if (!r.script || !r.cond) {
3573 console.log("fatal error (" + n +")!!!");
3574 continue;
3575 }
3576 if (r.script.position && r.script.position > pos) pos = r.script.position;
3577 }
3578 var s = new scriptParser.Script();
3579 if (s.position > pos) pos = s.position;
3580 return pos;
3581};
3582
3583var matchUrl = function(href, reg, match) {
3584 var clean = function(url) {

Callers 1

addNewUserScriptFunction · 0.85

Calls 2

getAllScriptNamesFunction · 0.85
loadScriptByNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…