MCPcopy Index your code
hub / github.com/massCodeIO/massCode / init

Function init

integrations/clipper/src/popup.ts:46–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44void init()
45
46async function init(): Promise<void> {
47 settings = await getSettings()
48 activeTarget = settings.defaultTarget
49
50 if (apiPortInput) {
51 apiPortInput.value = String(settings.apiPort)
52 }
53
54 if (apiTokenInput) {
55 apiTokenInput.value = settings.apiToken
56 }
57
58 bindEvents()
59 updateTargetButtons()
60 updateSettingsPanel(!settings.apiToken.trim())
61
62 try {
63 currentPayload = await getActiveTabCapture()
64 updateTargetButtons()
65 updateCaptureName(true)
66 updateSourceRow()
67 updatePreview()
68 }
69 catch (error) {
70 setStatus(getErrorMessage(error), true)
71 }
72}
73
74function bindEvents(): void {
75 targetButtons.forEach((button) => {

Callers 1

popup.tsFile · 0.70

Calls 10

getSettingsFunction · 0.90
bindEventsFunction · 0.85
updateTargetButtonsFunction · 0.85
updateSettingsPanelFunction · 0.85
getActiveTabCaptureFunction · 0.85
updateCaptureNameFunction · 0.85
updateSourceRowFunction · 0.85
updatePreviewFunction · 0.85
setStatusFunction · 0.85
getErrorMessageFunction · 0.70

Tested by

no test coverage detected