|
|
|
@ -8,6 +8,11 @@ |
|
|
|
extractCalls = globalThis.extractCalls; |
|
|
|
extractCalls = globalThis.extractCalls; |
|
|
|
} |
|
|
|
} |
|
|
|
var UI = globalThis.DSHMEM || null; |
|
|
|
var UI = globalThis.DSHMEM || null; |
|
|
|
|
|
|
|
if (UI) { |
|
|
|
|
|
|
|
UI.onResetLoops(function () { queue.length = 0; pending.clear(); seenHashes.clear(); pumping = false; if (UI) UI.log('loops reset'); }); |
|
|
|
|
|
|
|
UI.onStop(function () { queue.length = 0; if (UI) UI.log('stopped'); }); |
|
|
|
|
|
|
|
UI.onSaveToken(function (v) { chrome.storage.local.set({ 'dshmem-bridge-token': v }, function () { if (UI) UI.log('token saved, reload page'); }); }); |
|
|
|
|
|
|
|
} |
|
|
|
if (!SEL) return; |
|
|
|
if (!SEL) return; |
|
|
|
if (!BRIDGE) return; |
|
|
|
if (!BRIDGE) return; |
|
|
|
if (typeof extractCalls !== "function") return; |
|
|
|
if (typeof extractCalls !== "function") return; |
|
|
|
@ -171,11 +176,6 @@ |
|
|
|
if (UI) { UI.setPhase('off'); UI.setConnected(false); UI.log('no token'); } |
|
|
|
if (UI) { UI.setPhase('off'); UI.setConnected(false); UI.log('no token'); } |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (UI) { |
|
|
|
|
|
|
|
UI.onResetLoops(function () { queue.length = 0; pending.clear(); seenHashes.clear(); pumping = false; if (UI) UI.log('loops reset'); }); |
|
|
|
|
|
|
|
UI.onStop(function () { queue.length = 0; if (UI) UI.log('stopped'); }); |
|
|
|
|
|
|
|
UI.onSaveToken(function (v) { chrome.storage.local.set({ 'dshmem-bridge-token': v }, function () { if (UI) UI.log('token saved, reload page'); }); }); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
obs.observe(document.documentElement, { |
|
|
|
obs.observe(document.documentElement, { |
|
|
|
childList: true, |
|
|
|
childList: true, |
|
|
|
subtree: true, |
|
|
|
subtree: true, |
|
|
|
|