@flrande/bak-extension 0.6.16 → 0.6.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.bak-e2e-build-stamp +1 -1
- package/dist/background.global.js +604 -54
- package/dist/content.global.js +356 -20
- package/dist/manifest.json +1 -1
- package/package.json +2 -2
- package/src/background.ts +445 -74
- package/src/content.ts +257 -24
- package/src/dynamic-data-tools.ts +139 -5
- package/src/network-debugger.ts +19 -47
- package/src/network-tools.ts +184 -0
package/dist/content.global.js
CHANGED
|
@@ -239,6 +239,155 @@
|
|
|
239
239
|
};
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
+
// src/network-tools.ts
|
|
243
|
+
var ROW_CANDIDATE_KEYS2 = ["data", "rows", "results", "items", "records", "entries"];
|
|
244
|
+
var SUMMARY_TEXT_LIMIT = 96;
|
|
245
|
+
function truncateSummaryText(value, limit = SUMMARY_TEXT_LIMIT) {
|
|
246
|
+
const normalized = value.replace(/\s+/g, " ").trim();
|
|
247
|
+
if (normalized.length <= limit) {
|
|
248
|
+
return normalized;
|
|
249
|
+
}
|
|
250
|
+
return `${normalized.slice(0, Math.max(1, limit - 1)).trimEnd()}...`;
|
|
251
|
+
}
|
|
252
|
+
function safeParseUrl(urlText) {
|
|
253
|
+
try {
|
|
254
|
+
return new URL(urlText);
|
|
255
|
+
} catch {
|
|
256
|
+
try {
|
|
257
|
+
return new URL(urlText, "http://127.0.0.1");
|
|
258
|
+
} catch {
|
|
259
|
+
return null;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
function looksLikeFormBody(value) {
|
|
264
|
+
return value.includes("=") && (value.includes("&") || !value.trim().startsWith("{"));
|
|
265
|
+
}
|
|
266
|
+
function summarizeSearchParams(params) {
|
|
267
|
+
const entries = [];
|
|
268
|
+
params.forEach((value, key) => {
|
|
269
|
+
entries.push([key, value]);
|
|
270
|
+
});
|
|
271
|
+
if (entries.length === 0) {
|
|
272
|
+
return void 0;
|
|
273
|
+
}
|
|
274
|
+
const preview = entries.slice(0, 4).map(([key, value]) => `${key}=${truncateSummaryText(value, 32)}`);
|
|
275
|
+
return entries.length > 4 ? `${preview.join(", ")} ...` : preview.join(", ");
|
|
276
|
+
}
|
|
277
|
+
function summarizeJsonValue(value) {
|
|
278
|
+
if (Array.isArray(value)) {
|
|
279
|
+
return `json array(${value.length})`;
|
|
280
|
+
}
|
|
281
|
+
if (!value || typeof value !== "object") {
|
|
282
|
+
return `json ${truncateSummaryText(String(value), 40)}`;
|
|
283
|
+
}
|
|
284
|
+
const record = value;
|
|
285
|
+
for (const key of ROW_CANDIDATE_KEYS2) {
|
|
286
|
+
if (Array.isArray(record[key])) {
|
|
287
|
+
return `json rows(${record[key].length}) via ${key}`;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
const keys = Object.keys(record).slice(0, 5);
|
|
291
|
+
return keys.length > 0 ? `json keys: ${keys.join(", ")}` : "json object";
|
|
292
|
+
}
|
|
293
|
+
function headerValue(headers, name) {
|
|
294
|
+
if (!headers) {
|
|
295
|
+
return void 0;
|
|
296
|
+
}
|
|
297
|
+
const normalizedName = name.toLowerCase();
|
|
298
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
299
|
+
if (key.toLowerCase() === normalizedName) {
|
|
300
|
+
return value;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
return void 0;
|
|
304
|
+
}
|
|
305
|
+
function summarizeNetworkPayload(payload, contentType, truncated = false) {
|
|
306
|
+
if (typeof payload !== "string") {
|
|
307
|
+
return void 0;
|
|
308
|
+
}
|
|
309
|
+
const trimmed = payload.trim();
|
|
310
|
+
if (!trimmed) {
|
|
311
|
+
return void 0;
|
|
312
|
+
}
|
|
313
|
+
const normalizedContentType = contentType?.toLowerCase() ?? "";
|
|
314
|
+
let summary;
|
|
315
|
+
if (normalizedContentType.includes("json") || trimmed.startsWith("{") || trimmed.startsWith("[")) {
|
|
316
|
+
try {
|
|
317
|
+
summary = summarizeJsonValue(JSON.parse(trimmed));
|
|
318
|
+
} catch {
|
|
319
|
+
summary = `json text: ${truncateSummaryText(trimmed)}`;
|
|
320
|
+
}
|
|
321
|
+
} else if (normalizedContentType.includes("x-www-form-urlencoded") || looksLikeFormBody(trimmed)) {
|
|
322
|
+
try {
|
|
323
|
+
const params = new URLSearchParams(trimmed);
|
|
324
|
+
const preview = summarizeSearchParams(params);
|
|
325
|
+
summary = preview ? `form: ${preview}` : "form body";
|
|
326
|
+
} catch {
|
|
327
|
+
summary = `form text: ${truncateSummaryText(trimmed)}`;
|
|
328
|
+
}
|
|
329
|
+
} else {
|
|
330
|
+
summary = `text: ${truncateSummaryText(trimmed)}`;
|
|
331
|
+
}
|
|
332
|
+
return truncated ? `${summary} (truncated)` : summary;
|
|
333
|
+
}
|
|
334
|
+
function buildNetworkEntryDerivedFields(entry) {
|
|
335
|
+
const parsedUrl = safeParseUrl(entry.url);
|
|
336
|
+
const preview = {
|
|
337
|
+
query: parsedUrl ? summarizeSearchParams(parsedUrl.searchParams) : void 0,
|
|
338
|
+
request: summarizeNetworkPayload(
|
|
339
|
+
entry.requestBodyPreview,
|
|
340
|
+
headerValue(entry.requestHeaders, "content-type"),
|
|
341
|
+
entry.requestBodyTruncated === true
|
|
342
|
+
),
|
|
343
|
+
response: summarizeNetworkPayload(entry.responseBodyPreview, entry.contentType, entry.responseBodyTruncated === true)
|
|
344
|
+
};
|
|
345
|
+
return {
|
|
346
|
+
hostname: parsedUrl?.hostname,
|
|
347
|
+
pathname: parsedUrl?.pathname,
|
|
348
|
+
preview: preview.query || preview.request || preview.response ? preview : void 0
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
function clampNetworkListLimit(limit, fallback = 50) {
|
|
352
|
+
return typeof limit === "number" ? Math.max(1, Math.min(500, Math.floor(limit))) : fallback;
|
|
353
|
+
}
|
|
354
|
+
function networkEntryMatchesFilters(entry, filters) {
|
|
355
|
+
const urlIncludes = typeof filters.urlIncludes === "string" ? filters.urlIncludes : "";
|
|
356
|
+
const method = typeof filters.method === "string" ? filters.method.toUpperCase() : "";
|
|
357
|
+
const status = typeof filters.status === "number" ? filters.status : void 0;
|
|
358
|
+
const domain = typeof filters.domain === "string" ? filters.domain.trim().toLowerCase() : "";
|
|
359
|
+
const resourceType = typeof filters.resourceType === "string" ? filters.resourceType.trim().toLowerCase() : "";
|
|
360
|
+
const kind = typeof filters.kind === "string" ? filters.kind : void 0;
|
|
361
|
+
const sinceTs = typeof filters.sinceTs === "number" ? filters.sinceTs : void 0;
|
|
362
|
+
if (typeof sinceTs === "number" && entry.ts < sinceTs) {
|
|
363
|
+
return false;
|
|
364
|
+
}
|
|
365
|
+
if (urlIncludes && !entry.url.includes(urlIncludes)) {
|
|
366
|
+
return false;
|
|
367
|
+
}
|
|
368
|
+
if (method && entry.method.toUpperCase() !== method) {
|
|
369
|
+
return false;
|
|
370
|
+
}
|
|
371
|
+
if (typeof status === "number" && entry.status !== status) {
|
|
372
|
+
return false;
|
|
373
|
+
}
|
|
374
|
+
if (domain) {
|
|
375
|
+
const hostname = (entry.hostname ?? safeParseUrl(entry.url)?.hostname ?? "").toLowerCase();
|
|
376
|
+
if (!hostname || !hostname.includes(domain) && hostname !== domain) {
|
|
377
|
+
return false;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
if (resourceType) {
|
|
381
|
+
if ((entry.resourceType ?? "").toLowerCase() !== resourceType) {
|
|
382
|
+
return false;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
if (kind && entry.kind !== kind) {
|
|
386
|
+
return false;
|
|
387
|
+
}
|
|
388
|
+
return true;
|
|
389
|
+
}
|
|
390
|
+
|
|
242
391
|
// src/privacy.ts
|
|
243
392
|
var MAX_SAFE_TEXT_LENGTH = 120;
|
|
244
393
|
var MAX_DEBUG_TEXT_LENGTH = 320;
|
|
@@ -1736,26 +1885,19 @@
|
|
|
1736
1885
|
return merged;
|
|
1737
1886
|
}
|
|
1738
1887
|
function filterNetworkEntries(params) {
|
|
1739
|
-
const
|
|
1740
|
-
const
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
return false;
|
|
1753
|
-
}
|
|
1754
|
-
if (typeof status === "number" && entry.status !== status) {
|
|
1755
|
-
return false;
|
|
1756
|
-
}
|
|
1757
|
-
return true;
|
|
1758
|
-
}).slice(-limit).reverse();
|
|
1888
|
+
const limit = clampNetworkListLimit(typeof params.limit === "number" ? params.limit : void 0, 50);
|
|
1889
|
+
const ordered = networkSnapshotEntries().map((entry) => ({ ...entry, ...buildNetworkEntryDerivedFields(entry) })).filter(
|
|
1890
|
+
(entry) => networkEntryMatchesFilters(entry, {
|
|
1891
|
+
urlIncludes: typeof params.urlIncludes === "string" ? params.urlIncludes : void 0,
|
|
1892
|
+
status: typeof params.status === "number" ? params.status : void 0,
|
|
1893
|
+
method: typeof params.method === "string" ? params.method : void 0,
|
|
1894
|
+
domain: typeof params.domain === "string" ? params.domain : void 0,
|
|
1895
|
+
resourceType: typeof params.resourceType === "string" ? params.resourceType : void 0,
|
|
1896
|
+
kind: typeof params.kind === "string" ? params.kind : void 0,
|
|
1897
|
+
sinceTs: typeof params.sinceTs === "number" ? params.sinceTs : void 0
|
|
1898
|
+
})
|
|
1899
|
+
).slice(-limit);
|
|
1900
|
+
return params.tail === true ? ordered : ordered.reverse();
|
|
1759
1901
|
}
|
|
1760
1902
|
function filterNetworkEntrySections(entry, include) {
|
|
1761
1903
|
if (!Array.isArray(include)) {
|
|
@@ -1772,12 +1914,26 @@
|
|
|
1772
1914
|
delete clone.requestHeaders;
|
|
1773
1915
|
delete clone.requestBodyPreview;
|
|
1774
1916
|
delete clone.requestBodyTruncated;
|
|
1917
|
+
if (clone.preview) {
|
|
1918
|
+
clone.preview = { ...clone.preview };
|
|
1919
|
+
delete clone.preview.request;
|
|
1920
|
+
if (!clone.preview.query && !clone.preview.request && !clone.preview.response) {
|
|
1921
|
+
delete clone.preview;
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1775
1924
|
}
|
|
1776
1925
|
if (!sections.has("response")) {
|
|
1777
1926
|
delete clone.responseHeaders;
|
|
1778
1927
|
delete clone.responseBodyPreview;
|
|
1779
1928
|
delete clone.responseBodyTruncated;
|
|
1780
1929
|
delete clone.binary;
|
|
1930
|
+
if (clone.preview) {
|
|
1931
|
+
clone.preview = { ...clone.preview };
|
|
1932
|
+
delete clone.preview.response;
|
|
1933
|
+
if (!clone.preview.query && !clone.preview.request && !clone.preview.response) {
|
|
1934
|
+
delete clone.preview;
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1781
1937
|
}
|
|
1782
1938
|
return clone;
|
|
1783
1939
|
}
|
|
@@ -2653,6 +2809,182 @@
|
|
|
2653
2809
|
}
|
|
2654
2810
|
}).filter((item) => item !== null);
|
|
2655
2811
|
}
|
|
2812
|
+
var MODE_OPTION_PATTERN = /\b(latest|historical|history|archive|archived|live|intraday|today|yesterday|session|completed)\b/i;
|
|
2813
|
+
function selectorHintForElement(element) {
|
|
2814
|
+
if (element instanceof HTMLElement && element.id) {
|
|
2815
|
+
return `#${element.id}`;
|
|
2816
|
+
}
|
|
2817
|
+
if (element instanceof HTMLElement && element.getAttribute("name")) {
|
|
2818
|
+
return `${element.tagName.toLowerCase()}[name="${element.getAttribute("name")}"]`;
|
|
2819
|
+
}
|
|
2820
|
+
const role = element.getAttribute("role");
|
|
2821
|
+
if (role) {
|
|
2822
|
+
return `${element.tagName.toLowerCase()}[role="${role}"]`;
|
|
2823
|
+
}
|
|
2824
|
+
return element.tagName.toLowerCase();
|
|
2825
|
+
}
|
|
2826
|
+
function cleanControlText(value) {
|
|
2827
|
+
if (typeof value !== "string") {
|
|
2828
|
+
return void 0;
|
|
2829
|
+
}
|
|
2830
|
+
const normalized = value.replace(/\s+/g, " ").trim();
|
|
2831
|
+
return normalized.length > 0 ? normalized : void 0;
|
|
2832
|
+
}
|
|
2833
|
+
function extractElementLabel(element) {
|
|
2834
|
+
if (element instanceof HTMLInputElement && element.labels && element.labels.length > 0) {
|
|
2835
|
+
return cleanControlText(element.labels[0]?.textContent);
|
|
2836
|
+
}
|
|
2837
|
+
const ariaLabel = cleanControlText(element.getAttribute("aria-label"));
|
|
2838
|
+
if (ariaLabel) {
|
|
2839
|
+
return ariaLabel;
|
|
2840
|
+
}
|
|
2841
|
+
if (element instanceof HTMLElement && element.id) {
|
|
2842
|
+
const label = document.querySelector(`label[for="${CSS.escape(element.id)}"]`);
|
|
2843
|
+
if (label) {
|
|
2844
|
+
return cleanControlText(label.textContent);
|
|
2845
|
+
}
|
|
2846
|
+
}
|
|
2847
|
+
const fieldset = element.closest("fieldset");
|
|
2848
|
+
if (fieldset) {
|
|
2849
|
+
const legend = fieldset.querySelector("legend");
|
|
2850
|
+
const legendText = cleanControlText(legend?.textContent);
|
|
2851
|
+
if (legendText) {
|
|
2852
|
+
return legendText;
|
|
2853
|
+
}
|
|
2854
|
+
}
|
|
2855
|
+
return cleanControlText(element.parentElement?.getAttribute("aria-label") ?? element.parentElement?.getAttribute("data-label"));
|
|
2856
|
+
}
|
|
2857
|
+
function inferModeOption(element) {
|
|
2858
|
+
const label = cleanControlText(
|
|
2859
|
+
element instanceof HTMLInputElement && element.type === "radio" ? element.labels?.[0]?.textContent ?? element.value : element instanceof HTMLOptionElement ? element.textContent ?? element.value : element.textContent ?? element.getAttribute("value") ?? element.getAttribute("aria-label")
|
|
2860
|
+
) ?? cleanControlText(element.getAttribute("value"));
|
|
2861
|
+
if (!label || !MODE_OPTION_PATTERN.test(label)) {
|
|
2862
|
+
return null;
|
|
2863
|
+
}
|
|
2864
|
+
const value = cleanControlText(
|
|
2865
|
+
element instanceof HTMLInputElement || element instanceof HTMLOptionElement ? element.value : element.getAttribute("value") ?? label
|
|
2866
|
+
) ?? label;
|
|
2867
|
+
const selected = element instanceof HTMLOptionElement && element.selected || element instanceof HTMLInputElement && element.checked || element.getAttribute("aria-selected") === "true" || element.getAttribute("aria-pressed") === "true" || element.classList.contains("active") || element.classList.contains("selected") || element.classList.contains("current");
|
|
2868
|
+
return {
|
|
2869
|
+
label,
|
|
2870
|
+
value,
|
|
2871
|
+
selected
|
|
2872
|
+
};
|
|
2873
|
+
}
|
|
2874
|
+
function buildModeGroup(elements, controlType, container) {
|
|
2875
|
+
const options = elements.map((element) => inferModeOption(element)).filter((item) => item !== null);
|
|
2876
|
+
const deduped = options.filter((option, index, array) => array.findIndex((candidate) => candidate.label === option.label) === index);
|
|
2877
|
+
if (deduped.length < 2) {
|
|
2878
|
+
return null;
|
|
2879
|
+
}
|
|
2880
|
+
return {
|
|
2881
|
+
controlType,
|
|
2882
|
+
label: container ? extractElementLabel(container) : void 0,
|
|
2883
|
+
selectorHint: container ? selectorHintForElement(container) : selectorHintForElement(elements[0]),
|
|
2884
|
+
options: deduped
|
|
2885
|
+
};
|
|
2886
|
+
}
|
|
2887
|
+
function collectModeGroups(root) {
|
|
2888
|
+
const groups = [];
|
|
2889
|
+
const handled = /* @__PURE__ */ new Set();
|
|
2890
|
+
for (const select of Array.from(root.querySelectorAll("select"))) {
|
|
2891
|
+
const options = Array.from(select.querySelectorAll("option"));
|
|
2892
|
+
const group = buildModeGroup(options, "select", select);
|
|
2893
|
+
if (!group) {
|
|
2894
|
+
continue;
|
|
2895
|
+
}
|
|
2896
|
+
options.forEach((option) => handled.add(option));
|
|
2897
|
+
groups.push(group);
|
|
2898
|
+
}
|
|
2899
|
+
for (const container of Array.from(root.querySelectorAll('[role="tablist"], [role="radiogroup"], fieldset'))) {
|
|
2900
|
+
const role = container.getAttribute("role");
|
|
2901
|
+
const elements = role === "tablist" ? Array.from(container.querySelectorAll('[role="tab"]')) : role === "radiogroup" ? Array.from(container.querySelectorAll('[role="radio"], input[type="radio"]')) : Array.from(container.querySelectorAll('input[type="radio"], button'));
|
|
2902
|
+
const untouched = elements.filter((element) => !handled.has(element));
|
|
2903
|
+
const group = buildModeGroup(untouched, role === "tablist" ? "tabs" : role === "radiogroup" ? "radio" : "buttons", container);
|
|
2904
|
+
if (!group) {
|
|
2905
|
+
continue;
|
|
2906
|
+
}
|
|
2907
|
+
untouched.forEach((element) => handled.add(element));
|
|
2908
|
+
groups.push(group);
|
|
2909
|
+
}
|
|
2910
|
+
const candidateParents = /* @__PURE__ */ new Set();
|
|
2911
|
+
for (const button of Array.from(root.querySelectorAll("button"))) {
|
|
2912
|
+
if (button.parentElement) {
|
|
2913
|
+
candidateParents.add(button.parentElement);
|
|
2914
|
+
}
|
|
2915
|
+
}
|
|
2916
|
+
for (const parent of candidateParents) {
|
|
2917
|
+
const directButtons = Array.from(parent.children).filter((child) => child instanceof HTMLButtonElement);
|
|
2918
|
+
if (directButtons.length < 2 || directButtons.length > 6 || directButtons.every((button) => handled.has(button))) {
|
|
2919
|
+
continue;
|
|
2920
|
+
}
|
|
2921
|
+
const group = buildModeGroup(
|
|
2922
|
+
directButtons.filter((button) => !handled.has(button)),
|
|
2923
|
+
"buttons",
|
|
2924
|
+
parent
|
|
2925
|
+
);
|
|
2926
|
+
if (!group) {
|
|
2927
|
+
continue;
|
|
2928
|
+
}
|
|
2929
|
+
directButtons.forEach((button) => handled.add(button));
|
|
2930
|
+
groups.push(group);
|
|
2931
|
+
}
|
|
2932
|
+
return groups.slice(0, 6);
|
|
2933
|
+
}
|
|
2934
|
+
function normalizeDateValue(value) {
|
|
2935
|
+
const normalized = cleanControlText(value);
|
|
2936
|
+
if (!normalized) {
|
|
2937
|
+
return void 0;
|
|
2938
|
+
}
|
|
2939
|
+
return Number.isFinite(Date.parse(normalized)) || /^\d{4}-\d{2}-\d{2}$/.test(normalized) ? normalized : void 0;
|
|
2940
|
+
}
|
|
2941
|
+
function collectDateControls(root) {
|
|
2942
|
+
const controls = [];
|
|
2943
|
+
for (const input of Array.from(root.querySelectorAll('input[type="date"], input[type="datetime-local"], input[type="month"], input[type="week"]'))) {
|
|
2944
|
+
controls.push({
|
|
2945
|
+
controlType: "input",
|
|
2946
|
+
label: extractElementLabel(input),
|
|
2947
|
+
selectorHint: selectorHintForElement(input),
|
|
2948
|
+
value: normalizeDateValue(input.value),
|
|
2949
|
+
min: normalizeDateValue(input.min),
|
|
2950
|
+
max: normalizeDateValue(input.max),
|
|
2951
|
+
dataMaxDate: normalizeDateValue(input.getAttribute("data-max-date"))
|
|
2952
|
+
});
|
|
2953
|
+
}
|
|
2954
|
+
for (const select of Array.from(root.querySelectorAll("select"))) {
|
|
2955
|
+
const optionValues = Array.from(select.querySelectorAll("option")).map((option) => normalizeDateValue(option.value) ?? normalizeDateValue(option.textContent)).filter((value) => typeof value === "string");
|
|
2956
|
+
const dataMaxDate = normalizeDateValue(select.getAttribute("data-max-date"));
|
|
2957
|
+
if (optionValues.length === 0 && !dataMaxDate) {
|
|
2958
|
+
continue;
|
|
2959
|
+
}
|
|
2960
|
+
controls.push({
|
|
2961
|
+
controlType: "select",
|
|
2962
|
+
label: extractElementLabel(select),
|
|
2963
|
+
selectorHint: selectorHintForElement(select),
|
|
2964
|
+
value: normalizeDateValue(select.value),
|
|
2965
|
+
dataMaxDate,
|
|
2966
|
+
options: [...new Set(optionValues)].slice(0, 8)
|
|
2967
|
+
});
|
|
2968
|
+
}
|
|
2969
|
+
for (const element of Array.from(root.querySelectorAll("[data-max-date], [data-date]"))) {
|
|
2970
|
+
if (element instanceof HTMLInputElement || element instanceof HTMLSelectElement) {
|
|
2971
|
+
continue;
|
|
2972
|
+
}
|
|
2973
|
+
const dataMaxDate = normalizeDateValue(element.getAttribute("data-max-date"));
|
|
2974
|
+
const value = normalizeDateValue(element.getAttribute("data-date"));
|
|
2975
|
+
if (!dataMaxDate && !value) {
|
|
2976
|
+
continue;
|
|
2977
|
+
}
|
|
2978
|
+
controls.push({
|
|
2979
|
+
controlType: "dataset",
|
|
2980
|
+
label: extractElementLabel(element),
|
|
2981
|
+
selectorHint: selectorHintForElement(element),
|
|
2982
|
+
value,
|
|
2983
|
+
dataMaxDate
|
|
2984
|
+
});
|
|
2985
|
+
}
|
|
2986
|
+
return controls.slice(0, 10);
|
|
2987
|
+
}
|
|
2656
2988
|
async function collectInspectionState(params = {}) {
|
|
2657
2989
|
const rootResult = resolveRootForLocator();
|
|
2658
2990
|
if (!rootResult.ok) {
|
|
@@ -2674,6 +3006,8 @@
|
|
|
2674
3006
|
const previewGlobals = await globalsPreview();
|
|
2675
3007
|
const suspiciousGlobals = [...new Set(scripts.flatMap((script) => script.suspectedVars))].slice(0, 50);
|
|
2676
3008
|
const inlineJsonSources = collectInlineJsonSources(root);
|
|
3009
|
+
const modeGroups = collectModeGroups(root);
|
|
3010
|
+
const dateControls = collectDateControls(root);
|
|
2677
3011
|
return {
|
|
2678
3012
|
url: metadata.url,
|
|
2679
3013
|
title: metadata.title,
|
|
@@ -2693,6 +3027,8 @@
|
|
|
2693
3027
|
cookies: cookieMetadata(),
|
|
2694
3028
|
frames: collectFrames(),
|
|
2695
3029
|
inlineJsonSources,
|
|
3030
|
+
modeGroups,
|
|
3031
|
+
dateControls,
|
|
2696
3032
|
tables: describeTables(),
|
|
2697
3033
|
timers: {
|
|
2698
3034
|
timeouts: 0,
|
package/dist/manifest.json
CHANGED
package/package.json
CHANGED