PageSourceSearch

https://prat.ee/k/js/pages/ithinkthereforiam/lib/focus.js

js prat.ee collected 2026-10-09 01:39:12 UTC 481 bytes, 20 lines download raw bytes

1// Focus mode
2
3import { showToast } from './utils.js';
4import { renderCards } from './cards.js';
5
6export function enterFocus(ctx) {
7    if (!ctx.selectedCardId) {
8        showToast('click a thought first, then press F');
9        return;
10    }
11    ctx.focusMode = true;
12    ctx.dom.focusOverlay.classList.add('active');
13    renderCards(ctx);
14}
15
16export function exitFocus(ctx) {
17    ctx.focusMode = false;
18    ctx.dom.focusOverlay.classList.remove('active');
19    renderCards(ctx);
20}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.