MCPcopy Index your code
hub / github.com/MALSync/MALSync / checkFill

Function checkFill

src/popup.ts:39–56  ·  view source on GitHub ↗
(minimalObj: Minimal, home = false)

Source from the content-addressed store, hash-verified

37});
38
39function checkFill(minimalObj: Minimal, home = false) {
40 con.log('CheckFill');
41 if (!chrome.tabs) {
42 con.error('Can not check for tabs');
43 return;
44 }
45 chrome.tabs.query({ active: true }, tabs => {
46 con.m('tabs').log(tabs);
47 tabs.forEach(el => {
48 chrome.tabs.sendMessage(el.id!, { action: 'TabMalUrl' }, response => {
49 if (response && response.url) {
50 con.log('Fill', response);
51 minimalObj.fill(response, home);
52 }
53 });
54 });
55 });
56}

Callers 1

popup.tsFile · 0.85

Calls 3

errorMethod · 0.80
sendMessageMethod · 0.80
fillMethod · 0.80

Tested by

no test coverage detected