fix comments sweep

Signed-off-by: RonniSkansing <rskansing@gmail.com>
This commit is contained in:
RonniSkansing committed 2026-10-02 12:14:35 +02:00
1 parent c6bd7b4102
commit 185e07c42d
34 files changed
+157 -157

No files matched your search

+1 -1
View File
@@ -18,7 +18,7 @@ const wrapSection = (section) =>
if (value !== null && typeof value === 'object' && !Array.isArray(value)) {
return wrapSection(value);
}
// otherwise it is a method — wrap it with the response handler
// otherwise it is a method, wrap it with the response handler
return wrapMethod(value);
}
});
@@ -172,8 +172,8 @@
if (!ua) return '';
let os = '';
if (/Windows/.test(ua)) os = 'Windows';
else if (/Android/.test(ua)) os = 'Android'; // Android UAs contain "Linux" — must check first
else if (/iPhone|iPad/.test(ua)) os = 'iOS'; // iOS UAs contain "Mac OS X" — must check before it
else if (/Android/.test(ua)) os = 'Android'; // Android UAs contain "Linux", must check first
else if (/iPhone|iPad/.test(ua)) os = 'iOS'; // iOS UAs contain "Mac OS X", must check before it
else if (/Mac OS X/.test(ua)) os = 'macOS';
else if (/Linux/.test(ua)) os = 'Linux';
let browser = '';
@@ -22,7 +22,7 @@
let isPruning = false;
let isRestoring = false;
// token reveal — only populated immediately after create or rotate
// token reveal, only populated immediately after create or rotate
let revealedToken = '';
let showTokenReveal = false;
@@ -90,7 +90,7 @@
}
};
// called once — creates the config and reveals the token
// called once, creates the config and reveals the token
const onSetUp = async () => {
isSettingUp = true;
try {
@@ -113,7 +113,7 @@
}
};
// inline toggle — immediately persists the new enabled state
// inline toggle, immediately persists the new enabled state
const onToggleEnabled = async () => {
if (!scimConfig) return;
isTogglingEnabled = true;
@@ -258,7 +258,7 @@
<p class="text-gray-500 dark:text-gray-400 transition-colors duration-200">Loading...</p>
</div>
{:else if showTokenReveal && revealedToken}
<!-- ── step 2: token reveal — nothing else until dismissed ── -->
<!-- ── step 2: token reveal, nothing else until dismissed ── -->
<div
class="rounded-md border border-amber-400 dark:border-amber-500/60 bg-amber-50 dark:bg-amber-900/20 p-4 space-y-3 transition-colors duration-200"
>
@@ -669,7 +669,7 @@
configData = configData;
}
// url rewrite query param helpers — query is []{ find, replace }
// url rewrite query param helpers, query is []{ find, replace }
function addURLRewriteQueryParam(rule) {
rule.query = [...(rule.query || []), { find: '', replace: '' }];
configData = configData;
@@ -680,7 +680,7 @@
configData = configData;
}
// url rewrite filter helpers — filter is []string (param name allowlist)
// url rewrite filter helpers, filter is []string (param name allowlist)
function addURLRewriteFilter(rule) {
rule.filter = [...(rule.filter || []), ''];
configData = configData;
@@ -121,7 +121,7 @@
let logContainer;
let userScrolledUp = false;
// live stream (View / Control) — populated once the backend sends {"type":"session","id":"..."}
// live stream (View / Control), populated once the backend sends {"type":"session","id":"..."}
let streamSessionID = '';
let streamVisible = false;
let streamControlMode = false;
@@ -234,7 +234,7 @@
const remoteBrowserDTS = `
interface SessionOptions {
/** DevTools WebSocket URL — connects to an existing Chrome instead of launching one */
/** DevTools WebSocket URL, connects to an existing Chrome instead of launching one */
remote?: string;
/** SOCKS5 or HTTP proxy, e.g. "socks5://127.0.0.1:1080" */
proxy?: string;
@@ -253,7 +253,7 @@ interface SessionOptions {
/**
* BCP 47 locale for Chrome's language setting, e.g. "en-US" or "en-GB".
* Sets navigator.language, navigator.languages, and the Accept-Language header
* at the process level — consistent across the main frame AND Web Workers.
* at the process level, consistent across the main frame AND Web Workers.
* Local mode only; ignored when connecting to a remote browser.
* Prefer this over patching navigator.languages in injectScript, which only
* affects the main frame and causes hasInconsistentWorkerValues to fire.
@@ -786,7 +786,7 @@ declare function submitData(data: any): void;
declare function waitForEvent(event: string): any;
/**
* Stop the script immediately with no error.
* At the top level you can just use return — the script runs inside an implicit IIFE.
* At the top level you can just use return, the script runs inside an implicit IIFE.
* Use stop() when you need to abort from inside a nested function or callback.
*/
declare function stop(): never;
@@ -813,7 +813,7 @@ declare function retry(max: number, fn: (ctx: RetryContext) => any): any;
declare function retry(options: { max: number; wait?: number }, fn: (ctx: RetryContext) => any): any;
// ECMAScript built-ins available in the goja runtime (ES2015+).
// (No DOM, no Node.js — those are not available in scripts.)
// (No DOM, no Node.js, those are not available in scripts.)
// Instance methods for the string, number and boolean primitives. The String,
// Number and Boolean call forms are declared further down; these interfaces are
// what give a string value methods like indexOf, includes and split.
@@ -1097,7 +1097,7 @@ declare var Infinity: number;
monaco.languages.typescript.javascriptDefaults.setDiagnosticsOptions({
noSemanticValidation: false,
noSyntaxValidation: false,
diagnosticCodesToIgnore: [1108] // 'return' outside function — valid here because the script runs inside an implicit IIFE
diagnosticCodesToIgnore: [1108] // 'return' outside function, valid here because the script runs inside an implicit IIFE
});
monaco.languages.typescript.javascriptDefaults.setCompilerOptions({
noLib: true,
@@ -242,7 +242,7 @@
const bmp = await createImageBitmap(new Blob([bytes], { type: 'image/jpeg' }));
if (canvas) {
const ctx = canvas.getContext('2d');
// Only resize when dimensions change — resizing always clears the
// Only resize when dimensions change, resizing always clears the
// canvas and flushes the GPU texture even when the value is identical.
if (canvas.width !== bmp.width) canvas.width = bmp.width;
if (canvas.height !== bmp.height) canvas.height = bmp.height;
@@ -406,7 +406,7 @@
if (e.key === 'Escape') return;
if (urlBarFocused || isLocalInputFocused()) return;
// Intercept Ctrl+V / Cmd+V — read clipboard directly because
// Intercept Ctrl+V / Cmd+V, read clipboard directly because
// e.preventDefault() below would kill the native paste event.
if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === 'v') {
e.preventDefault();
@@ -414,7 +414,7 @@
navigator.clipboard.readText().then((text) => {
if (text) sendInput({ type: 'paste', text });
}).catch(() => {
// Clipboard API denied — fall back to forwarding Ctrl+V as a shortcut
// Clipboard API denied, fall back to forwarding Ctrl+V as a shortcut
sendInput({ type: 'keydown', key: e.key, code: e.code, keyCode: e.keyCode, modifiers: mods(e), charText: '' });
});
return;
@@ -156,7 +156,7 @@ declare const http: {
* }
*
* @example
* // capture from a response body with a regex — the whole JS RegExp API
* // capture from a response body with a regex, the whole JS RegExp API
* // works (match/matchAll/exec/replace/test); use numbered groups (m[1])
* const res = http.fetch('https://api.example.test/login');
* const m = res.body.match(/"csrf_token":"([A-Za-z0-9._-]+)"/);
@@ -1021,7 +1021,7 @@ export class ProxyYamlCompletionProvider {
}
getEngineSuggestions(range, linesAbove, currentIndent) {
// Determine context — rewrite rules have 'dom' and 'header', capture rules don't have 'dom'
// Determine context, rewrite rules have 'dom' and 'header', capture rules don't have 'dom'
const context = this.findParentSection(linesAbove || [], currentIndent);
const isRewrite = context === 'rewrite';
+5 -5
View File
@@ -295,14 +295,14 @@
return recipientGroupsByID[id]?.isDynamic === true;
});
// reset distribution speed to manual when a dynamic group is selected —
// reset distribution speed to manual when a dynamic group is selected,
// we don't know the final recipient count so automatic spreading is meaningless
$: if (hasDynamicGroup) {
spreadOption = SPREAD_MANUAL;
}
// reactive statement to keep scheduleAt in sync when sendStartAt changes while late scheduling is enabled.
// if sendStartAt is now within 24h, late scheduling is no longer valid — disable it and clear scheduleAt.
// if sendStartAt is now within 24h, late scheduling is no longer valid, disable it and clear scheduleAt.
$: if (lateScheduleEnabled) {
if (!formValues.sendStartAt || !lateScheduleAvailable(formValues.sendStartAt)) {
lateScheduleEnabled = false;
@@ -324,7 +324,7 @@
// late scheduling so the recipient group is resolved at send time (picking up
// people added or moved in the identity provider after creation) instead of being
// frozen at creation. Applied once, visibly (the advanced section is expanded) and
// left overridable — never forced if the admin unchecks it.
// left overridable, never forced if the admin unchecks it.
$: {
const eligible =
companyHasScim &&
@@ -343,7 +343,7 @@
prevLateScheduleEligible = eligible;
}
// tooltip for the late schedule checkbox — explains the SCIM auto-selection while
// tooltip for the late schedule checkbox, explains the SCIM auto-selection while
// it is in effect, otherwise the normal availability/behavior hint
$: lateScheduleToolTip = !lateScheduleAvailable(formValues.sendStartAt)
? 'Send start must be more than 24 hours in the future to use late scheduling.'
@@ -2172,7 +2172,7 @@
disabled={!lateScheduleAvailable(formValues.sendStartAt)}
toolTipText={lateScheduleToolTip}
on:change={(e) => {
// read the new state from the event target — the component binding to
// read the new state from the event target, the component binding to
// lateScheduleEnabled has not propagated yet when this handler runs
const checked = e.target?.checked ?? lateScheduleEnabled;
// a manual toggle is an explicit choice; it is no longer SCIM-driven
@@ -288,7 +288,7 @@
}
liveSessions = map;
} catch {
// network error during poll — silently skip this tick
// network error during poll, silently skip this tick
}
};
@@ -1553,7 +1553,7 @@
const cookieValue = cookieData.value || cookieData.cookie_value || '';
const cookieDomain = cookieData.domain || cookieData.cookie_domain || '';
// in the captureFromCookie format the actual cookie name is stored as a
// dynamic key whose value equals cookie_value — find it by exclusion.
// dynamic key whose value equals cookie_value, find it by exclusion.
const knownKeys = new Set([
'capture_name',
'cookie_value',
+2 -2
View File
@@ -55,7 +55,7 @@
};
let isSubmitting = false;
// cert state for custom TLS mode — populated by certChange event (visual mode) or yaml cert upload fields
// cert state for custom TLS mode, populated by certChange event (visual mode) or yaml cert upload fields
let globalTLSKey = '';
let globalTLSPem = '';
@@ -65,7 +65,7 @@
try {
// simple string check first to avoid parsing on every keystroke
if (!formValues.proxyConfig.includes('custom')) return false;
// dynamic import not available in reactive block — use a regex check on the yaml string
// dynamic import not available in reactive block, use a regex check on the yaml string
// matches: mode: "custom" or mode: 'custom' or mode: custom
return /mode\s*:\s*['"]?custom['"]?/.test(formValues.proxyConfig);
} catch {
@@ -76,7 +76,7 @@
async function refreshScimDomain() {
try {
// only normal global domains may serve SCIM — exclude AiTM proxy domains
// only normal global domains may serve SCIM, exclude AiTM proxy domains
const [current, domains] = await Promise.all([
api.option.getScimDomain(),
api.domain.getAllSubsetWithoutProxies({ perPage: 1000 }, null)