Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Fanfulla/OCR-buddy
/ functions
Functions
163 in github.com/Fanfulla/OCR-buddy
⨍
Functions
163
◇
Types & classes
30
↓ 52 callers
Function
$
(id: string)
src/sidepanel/sidepanel.ts:27
↓ 21 callers
Function
log
(s = '')
src/testbed/testbed.ts:11
↓ 19 callers
Function
post
(msg: OcrStatus | OcrResult | PageImagesOcr)
src/offscreen/offscreen.ts:13
↓ 19 callers
Function
setState
(s: State)
src/sidepanel/sidepanel.ts:143
↓ 18 callers
Function
restrictedReason
(url: string | undefined | null)
src/shared/restricted.ts:11
↓ 15 callers
Function
wiki
(lang, name, url, minLen = 150)
scripts/fetch-test-images.mjs:28
↓ 9 callers
Function
mergeTiles
(tiles: string[])
src/background/merge-tiles.ts:43
↓ 9 callers
Function
multi
(id: string)
src/offscreen/packs.ts:33
↓ 9 callers
Function
multi
(id)
scripts/ocr-image-test.mjs:31
↓ 9 callers
Function
shouldShowNudge
(s: ReviewState)
src/sidepanel/review.ts:32
↓ 8 callers
Function
check
(cond, msg)
scripts/verify-md.mjs:34
↓ 7 callers
Function
recognizeBuffer
( imageBuffer: ArrayBuffer, lang: string = DEFAULT_PACK, onProgress?: (p: number) => void, )
src/offscreen/engine.ts:414
↓ 7 callers
Function
thresholdFor
(nudgeCount: number)
src/sidepanel/review.ts:26
↓ 5 callers
Function
check
(cond, msg)
scripts/verify-capture-sources.mjs:52
↓ 5 callers
Function
ensureOffscreen
Only one offscreen document may exist per extension — check before creating.
src/background/service-worker.ts:377
↓ 5 callers
Function
median
(xs: number[])
src/offscreen/engine.ts:178
↓ 5 callers
Function
panelPrefs
The panel's persisted prefs: capture mode for entry points that don't carry * one (keyboard shortcut, post-grant fallback) and the OCR language pack.
src/background/service-worker.ts:112
↓ 5 callers
Function
savePrefs
()
src/sidepanel/sidepanel.ts:72
↓ 4 callers
Function
blockedIfRestricted
If a tab's page is one Chrome forbids all extensions from touching (the Web * Store, chrome:// …), tell the panel to abstain honestly and return tru
src/background/service-worker.ts:172
↓ 4 callers
Function
postCaptureError
Post NEED_PERMISSION for a missing host/activeTab grant, else surface the error.
src/background/service-worker.ts:197
↓ 4 callers
Function
syncPicker
Highlight the button matching `mode` within a picker, and roll the roving * tabindex onto it so Tab lands on the active option (arrow keys move from
src/sidepanel/sidepanel.ts:61
↓ 3 callers
Function
activeTab
()
src/sidepanel/sidepanel.ts:215
↓ 3 callers
Function
check
(cond, msg)
scripts/verify-realpage.mjs:35
↓ 3 callers
Function
check
(c, m)
scripts/verify-md-images.mjs:35
↓ 3 callers
Function
fetchBuf
(p: string)
src/testbed/testbed.ts:15
↓ 3 callers
Function
groupLines
Group a column's boxes into visual lines (by vertical overlap), each sorted * left-to-right, lines top-to-bottom.
src/offscreen/engine.ts:290
↓ 3 callers
Function
inject
(tabId: number, func: (...a: never[]) => T, ...args: unknown[])
src/background/fullpage.ts:37
↓ 3 callers
Function
lastMode
()
src/background/service-worker.ts:121
↓ 3 callers
Function
loadHistory
()
src/sidepanel/sidepanel.ts:665
↓ 3 callers
Function
norm
(s)
scripts/ocr-image-test.mjs:130
↓ 3 callers
Function
ocrImageFile
(file: File)
src/sidepanel/sidepanel.ts:766
↓ 3 callers
Function
setMode
(code: boolean)
src/sidepanel/sidepanel.ts:578
↓ 3 callers
Function
startBusy
(label: string)
src/sidepanel/sidepanel.ts:224
↓ 3 callers
Function
startSelection
Show the overlay on a tab, injecting it first if the content script is absent. * If we lack host access, ask the user to grant capture for this site.
src/background/service-worker.ts:136
↓ 3 callers
Function
wireRovingKeys
(container: HTMLElement, activateOnMove: boolean)
src/sidepanel/sidepanel.ts:598
↓ 2 callers
Function
absolutize
(els: NodeListOf<Element>, attr: string)
src/sidepanel/html-to-markdown.ts:25
↓ 2 callers
Function
blobToDataUrl
(blob: Blob)
src/background/service-worker.ts:367
↓ 2 callers
Function
cachedFetch
Cache-first fetch into Cache Storage (unlimitedStorage is granted).
src/offscreen/packs.ts:97
↓ 2 callers
Function
close
()
site/assets/analytics.js:71
↓ 2 callers
Function
colOf
(b: RecognitionResult)
src/offscreen/engine.ts:328
↓ 2 callers
Function
copyLabelFor
(mode?: CaptureMode)
src/sidepanel/sidepanel.ts:622
↓ 2 callers
Function
create
(buf: ArrayBuffer)
src/offscreen/formula.ts:48
↓ 2 callers
Function
destroyAll
()
scripts/ocr-image-test.mjs:162
↓ 2 callers
Function
download
(url, dest)
scripts/ocr-image-test.mjs:49
↓ 2 callers
Function
fetchLocal
(path: string)
src/offscreen/packs.ts:106
↓ 2 callers
Function
gapChroma
Fraction of a region's pixels that are strongly chromatic (max−min RGB). Reads * from the ORIGINAL colour pixels (boostColoredText greyscales the rec
src/offscreen/engine.ts:221
↓ 2 callers
Function
handleCapture
(req: CaptureRequest)
src/background/service-worker.ts:206
↓ 2 callers
Function
handleConvertPageMd
Read the page's full HTML (no OCR — structure comes from the DOM) and hand it to * the panel, which converts it to Markdown. The injected function i
src/background/service-worker.ts:287
↓ 2 callers
Function
handleFullPage
Capture the full scrollable page, then hand the tiles to the offscreen doc.
src/background/service-worker.ts:250
↓ 2 callers
Function
handleViewport
Capture the whole visible viewport (no region selection) and OCR it.
src/background/service-worker.ts:229
↓ 2 callers
Function
isSpan
(row: OcrWord[])
src/offscreen/engine.ts:498
↓ 2 callers
Function
langOf
(name)
scripts/ocr-image-test.mjs:167
↓ 2 callers
Function
loadState
()
src/sidepanel/review.ts:36
↓ 2 callers
Function
luma
(r: number, g: number, b: number)
src/offscreen/engine.ts:114
↓ 2 callers
Function
median
(xs)
scripts/ocr-image-test.mjs:80
↓ 2 callers
Function
median
(xs)
scripts/ocr-bench.mjs:65
↓ 2 callers
Function
norm
(s)
scripts/ocr-bench.mjs:127
↓ 2 callers
Function
ocr
(file, langId = 'latin')
scripts/ocr-image-test.mjs:169
↓ 2 callers
Function
openHistory
()
src/sidepanel/sidepanel.ts:694
↓ 2 callers
Function
optedOut
()
site/assets/analytics.js:17
↓ 2 callers
Function
packOf
(id: string)
src/offscreen/packs.ts:61
↓ 2 callers
Function
renderMarkdown
(html: string, title: string, url: string, ocrBySrc?: Map<string, string>)
src/sidepanel/sidepanel.ts:276
↓ 2 callers
Function
renderResult
(r: OcrResult, save = true)
src/sidepanel/sidepanel.ts:410
↓ 2 callers
Function
renderStars
(onActivate: () => void)
src/sidepanel/review.ts:82
↓ 2 callers
Function
renderText
Code mode → syntax-highlighted codeText (read-only). Prose → editable, with * per-word confidence underlines + a low-confidence summary.
src/sidepanel/sidepanel.ts:434
↓ 2 callers
Function
reprocess
Re-run OCR on a crop we already captured, in a new mode (no screenshot).
src/background/service-worker.ts:190
↓ 2 callers
Function
runAndRead
(msg, timeoutMs = 120000)
scripts/verify-realpage.mjs:51
↓ 2 callers
Function
runAndRead
(msg, timeoutMs = 60000)
scripts/verify-capture-sources.mjs:81
↓ 2 callers
Function
saveState
(s: ReviewState)
src/sidepanel/review.ts:45
↓ 2 callers
Function
setBackendBadge
(backend: 'webgpu' | 'wasm')
src/sidepanel/sidepanel.ts:385
↓ 2 callers
Function
showOverlay
Tell the overlay (if present) to show; true on success.
src/background/service-worker.ts:151
↓ 2 callers
Function
startActiveTabSelection
Resolve the active tab, then start selection on it.
src/background/service-worker.ts:128
↓ 2 callers
Function
syncLang
Reflect the selected pack in the UI; the download note only applies to * non-bundled packs.
src/sidepanel/sidepanel.ts:99
↓ 2 callers
Function
teardown
()
src/content/overlay.ts:70
↓ 2 callers
Function
wait
(ms: number)
src/background/fullpage.ts:16
↓ 1 callers
Function
boostColoredText
* Boost coloured text on a light background so detection sees it. PP-OCRv5's * detector is tuned for dark, high-luminance-contrast text; coloured tex
src/offscreen/engine.ts:129
↓ 1 callers
Function
build
()
site/assets/analytics.js:35
↓ 1 callers
Function
buildByteInverse
()
src/offscreen/formula.ts:65
↓ 1 callers
Function
buildRows
* Build one Row per visual line from box geometry. The recognizer dict has no * space token, so spacing is reconstructed: a space wherever there's a
src/offscreen/engine.ts:360
↓ 1 callers
Function
buildService
( lang: string, prev: Promise<PaddleOcrService> | null, onProgress?: (p: number) => void, )
src/offscreen/engine.ts:71
↓ 1 callers
Function
buildService
()
src/sidepanel/html-to-markdown.ts:56
↓ 1 callers
Function
buildSessions
()
src/offscreen/formula.ts:40
↓ 1 callers
Function
captureFullPage
( tabId: number, windowId: number, onProgress?: (tile: number) => void, )
src/background/fullpage.ts:67
↓ 1 callers
Function
captureOnce
One captureVisibleTab with a single retry on the rate-limit error.
src/background/fullpage.ts:48
↓ 1 callers
Function
center
(c: [number, number])
src/offscreen/engine.ts:532
↓ 1 callers
Function
clean
Parse HTML into a DETACHED document and strip non-content nodes. Never touches * the live page (the SW already serialized it to a string). Relative
src/sidepanel/html-to-markdown.ts:19
↓ 1 callers
Function
colOf
(b)
scripts/ocr-image-test.mjs:106
↓ 1 callers
Function
colOf
(b)
scripts/ocr-bench.mjs:97
↓ 1 callers
Function
copyOrtWasm
()
vite.config.ts:11
↓ 1 callers
Function
cropRegion
Crop the selected rect out of the full viewport PNG, scaling by DPR.
src/background/service-worker.ts:346
↓ 1 callers
Function
deHomoglyph
(s: string)
src/offscreen/engine.ts:203
↓ 1 callers
Function
deHomoglyph
(s)
scripts/ocr-image-test.mjs:78
↓ 1 callers
Function
deHomoglyph
(s)
scripts/ocr-bench.mjs:63
↓ 1 callers
Function
decodeIds
(ids: number[])
src/offscreen/formula.ts:90
↓ 1 callers
Function
fetchBuf
(path: string)
src/offscreen/engine.ts:55
↓ 1 callers
Function
fetchWithProgress
Stream a download, reporting progress 0..1 (content-length permitting).
src/offscreen/packs.ts:69
↓ 1 callers
Function
fixDigitOh
(s: string)
src/offscreen/engine.ts:210
↓ 1 callers
Function
formulaUsedWasm
()
src/offscreen/formula.ts:30
↓ 1 callers
Function
getService
Build the engine once per language; reused across captures.
src/offscreen/engine.ts:59
↓ 1 callers
Function
getSessions
()
src/offscreen/formula.ts:32
next →
1–100 of 163, ranked by callers