Skip to content

Commit c4bd93c

Browse files
author
SentienceDEV
authored
chore: sync extension files from sentience-chrome v2.2.0
1 parent 3a33c1d commit c4bd93c

File tree

6 files changed

+93
-93
lines changed

6 files changed

+93
-93
lines changed

latest_release.json

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
11
{
2-
"url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/273122615",
3-
"assets_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/273122615/assets",
4-
"upload_url": "https://uploads.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/273122615/assets{?name,label}",
5-
"html_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/tag/v2.0.7",
6-
"id": 273122615,
2+
"url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/274400382",
3+
"assets_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/274400382/assets",
4+
"upload_url": "https://uploads.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/274400382/assets{?name,label}",
5+
"html_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/tag/v2.2.0",
6+
"id": 274400382,
77
"author": {
8-
"login": "github-actions[bot]",
9-
"id": 41898282,
10-
"node_id": "MDM6Qm90NDE4OTgyODI=",
11-
"avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4",
8+
"login": "rcholic",
9+
"id": 135060,
10+
"node_id": "MDQ6VXNlcjEzNTA2MA==",
11+
"avatar_url": "https://avatars.githubusercontent.com/u/135060?v=4",
1212
"gravatar_id": "",
13-
"url": "https://api.github.com/users/github-actions%5Bbot%5D",
14-
"html_url": "https://github.com/apps/github-actions",
15-
"followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers",
16-
"following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}",
17-
"gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}",
18-
"starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}",
19-
"subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions",
20-
"organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs",
21-
"repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos",
22-
"events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}",
23-
"received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events",
24-
"type": "Bot",
13+
"url": "https://api.github.com/users/rcholic",
14+
"html_url": "https://github.com/rcholic",
15+
"followers_url": "https://api.github.com/users/rcholic/followers",
16+
"following_url": "https://api.github.com/users/rcholic/following{/other_user}",
17+
"gists_url": "https://api.github.com/users/rcholic/gists{/gist_id}",
18+
"starred_url": "https://api.github.com/users/rcholic/starred{/owner}{/repo}",
19+
"subscriptions_url": "https://api.github.com/users/rcholic/subscriptions",
20+
"organizations_url": "https://api.github.com/users/rcholic/orgs",
21+
"repos_url": "https://api.github.com/users/rcholic/repos",
22+
"events_url": "https://api.github.com/users/rcholic/events{/privacy}",
23+
"received_events_url": "https://api.github.com/users/rcholic/received_events",
24+
"type": "User",
2525
"user_view_type": "public",
2626
"site_admin": false
2727
},
28-
"node_id": "RE_kwDOQshiJ84QR4U3",
29-
"tag_name": "v2.0.7",
28+
"node_id": "RE_kwDOQshiJ84QWwR-",
29+
"tag_name": "v2.2.0",
3030
"target_commitish": "main",
31-
"name": "Release v2.0.7",
31+
"name": "Release v2.2.0",
3232
"draft": false,
3333
"immutable": false,
3434
"prerelease": false,
35-
"created_at": "2025-12-29T03:56:13Z",
36-
"updated_at": "2025-12-29T03:57:09Z",
37-
"published_at": "2025-12-29T03:57:08Z",
35+
"created_at": "2026-01-06T03:10:35Z",
36+
"updated_at": "2026-01-06T03:16:45Z",
37+
"published_at": "2026-01-06T03:16:10Z",
3838
"assets": [
3939
{
40-
"url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/333966751",
41-
"id": 333966751,
42-
"node_id": "RA_kwDOQshiJ84T5-2f",
40+
"url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/336823100",
41+
"id": 336823100,
42+
"node_id": "RA_kwDOQshiJ84UE4M8",
4343
"name": "extension-files.tar.gz",
4444
"label": "",
4545
"uploader": {
@@ -65,17 +65,17 @@
6565
},
6666
"content_type": "application/gzip",
6767
"state": "uploaded",
68-
"size": 78091,
69-
"digest": "sha256:e281f8b755b61da4b8015d6172064aa9a337c14133ceceff4ab29199ee53307e",
70-
"download_count": 9,
71-
"created_at": "2025-12-29T03:57:09Z",
72-
"updated_at": "2025-12-29T03:57:09Z",
73-
"browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.0.7/extension-files.tar.gz"
68+
"size": 72250,
69+
"digest": "sha256:adb68bd89b417f23f32c029c6cf045cc3677588e6a7760b7c8d0deb7e2601dd1",
70+
"download_count": 2,
71+
"created_at": "2026-01-06T03:16:44Z",
72+
"updated_at": "2026-01-06T03:16:45Z",
73+
"browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.2.0/extension-files.tar.gz"
7474
},
7575
{
76-
"url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/333966752",
77-
"id": 333966752,
78-
"node_id": "RA_kwDOQshiJ84T5-2g",
76+
"url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/336823099",
77+
"id": 336823099,
78+
"node_id": "RA_kwDOQshiJ84UE4M7",
7979
"name": "extension-package.zip",
8080
"label": "",
8181
"uploader": {
@@ -101,15 +101,15 @@
101101
},
102102
"content_type": "application/zip",
103103
"state": "uploaded",
104-
"size": 80179,
105-
"digest": "sha256:a025edeb8b6d05bfb25c57f913b68507060653ecbdf616000a46df4cb8dec377",
104+
"size": 73962,
105+
"digest": "sha256:7483812c016842fb02add2d6c8d887e321cb9eb89030fee016cf4ea9f812f4bf",
106106
"download_count": 0,
107-
"created_at": "2025-12-29T03:57:09Z",
108-
"updated_at": "2025-12-29T03:57:09Z",
109-
"browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.0.7/extension-package.zip"
107+
"created_at": "2026-01-06T03:16:44Z",
108+
"updated_at": "2026-01-06T03:16:45Z",
109+
"browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.2.0/extension-package.zip"
110110
}
111111
],
112-
"tarball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/tarball/v2.0.7",
113-
"zipball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/zipball/v2.0.7",
114-
"body": "**Full Changelog**: https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/compare/v2.0.6...v2.0.7"
112+
"tarball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/tarball/v2.2.0",
113+
"zipball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/zipball/v2.2.0",
114+
"body": ""
115115
}

sentience/extension/background.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ async function handleSnapshotProcessing(rawData, options = {}) {
2828
const startTime = performance.now();
2929
try {
3030
if (!Array.isArray(rawData)) throw new Error("rawData must be an array");
31-
if (rawData.length > 1e4 && (rawData = rawData.slice(0, 1e4)), await initWASM(),
31+
if (rawData.length > 1e4 && (rawData = rawData.slice(0, 1e4)), await initWASM(),
3232
!wasmReady) throw new Error("WASM module not initialized");
3333
let analyzedElements, prunedRawData;
3434
try {
3535
const wasmPromise = new Promise((resolve, reject) => {
3636
try {
3737
let result;
38-
result = options.limit || options.filter ? analyze_page_with_options(rawData, options) : analyze_page(rawData),
38+
result = options.limit || options.filter ? analyze_page_with_options(rawData, options) : analyze_page(rawData),
3939
resolve(result);
4040
} catch (e) {
4141
reject(e);
@@ -101,4 +101,4 @@ initWASM().catch(err => {}), chrome.runtime.onMessage.addListener((request, send
101101
event.preventDefault();
102102
}), self.addEventListener("unhandledrejection", event => {
103103
event.preventDefault();
104-
});
104+
});

sentience/extension/content.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
if (!elements || !Array.isArray(elements)) return;
8383
removeOverlay();
8484
const host = document.createElement("div");
85-
host.id = OVERLAY_HOST_ID, host.style.cssText = "\n position: fixed !important;\n top: 0 !important;\n left: 0 !important;\n width: 100vw !important;\n height: 100vh !important;\n pointer-events: none !important;\n z-index: 2147483647 !important;\n margin: 0 !important;\n padding: 0 !important;\n ",
85+
host.id = OVERLAY_HOST_ID, host.style.cssText = "\n position: fixed !important;\n top: 0 !important;\n left: 0 !important;\n width: 100vw !important;\n height: 100vh !important;\n pointer-events: none !important;\n z-index: 2147483647 !important;\n margin: 0 !important;\n padding: 0 !important;\n ",
8686
document.body.appendChild(host);
8787
const shadow = host.attachShadow({
8888
mode: "closed"
@@ -94,15 +94,15 @@
9494
let color;
9595
color = isTarget ? "#FF0000" : isPrimary ? "#0066FF" : "#00FF00";
9696
const importanceRatio = maxImportance > 0 ? importance / maxImportance : .5, borderOpacity = isTarget ? 1 : isPrimary ? .9 : Math.max(.4, .5 + .5 * importanceRatio), fillOpacity = .2 * borderOpacity, borderWidth = isTarget ? 2 : isPrimary ? 1.5 : Math.max(.5, Math.round(2 * importanceRatio)), hexOpacity = Math.round(255 * fillOpacity).toString(16).padStart(2, "0"), box = document.createElement("div");
97-
if (box.style.cssText = `\n position: absolute;\n left: ${bbox.x}px;\n top: ${bbox.y}px;\n width: ${bbox.width}px;\n height: ${bbox.height}px;\n border: ${borderWidth}px solid ${color};\n background-color: ${color}${hexOpacity};\n box-sizing: border-box;\n opacity: ${borderOpacity};\n pointer-events: none;\n `,
97+
if (box.style.cssText = `\n position: absolute;\n left: ${bbox.x}px;\n top: ${bbox.y}px;\n width: ${bbox.width}px;\n height: ${bbox.height}px;\n border: ${borderWidth}px solid ${color};\n background-color: ${color}${hexOpacity};\n box-sizing: border-box;\n opacity: ${borderOpacity};\n pointer-events: none;\n `,
9898
importance > 0 || isPrimary) {
9999
const badge = document.createElement("span");
100-
badge.textContent = isPrimary ? `⭐${importance}` : `${importance}`, badge.style.cssText = `\n position: absolute;\n top: -18px;\n left: 0;\n background: ${color};\n color: white;\n font-size: 11px;\n font-weight: bold;\n padding: 2px 6px;\n font-family: Arial, sans-serif;\n border-radius: 3px;\n opacity: 0.95;\n white-space: nowrap;\n pointer-events: none;\n `,
100+
badge.textContent = isPrimary ? `⭐${importance}` : `${importance}`, badge.style.cssText = `\n position: absolute;\n top: -18px;\n left: 0;\n background: ${color};\n color: white;\n font-size: 11px;\n font-weight: bold;\n padding: 2px 6px;\n font-family: Arial, sans-serif;\n border-radius: 3px;\n opacity: 0.95;\n white-space: nowrap;\n pointer-events: none;\n `,
101101
box.appendChild(badge);
102102
}
103103
if (isTarget) {
104104
const targetIndicator = document.createElement("span");
105-
targetIndicator.textContent = "🎯", targetIndicator.style.cssText = "\n position: absolute;\n top: -18px;\n right: 0;\n font-size: 16px;\n pointer-events: none;\n ",
105+
targetIndicator.textContent = "🎯", targetIndicator.style.cssText = "\n position: absolute;\n top: -18px;\n right: 0;\n font-size: 16px;\n pointer-events: none;\n ",
106106
box.appendChild(targetIndicator);
107107
}
108108
shadow.appendChild(box);
@@ -120,7 +120,7 @@
120120
let overlayTimeout = null;
121121
function removeOverlay() {
122122
const existing = document.getElementById(OVERLAY_HOST_ID);
123-
existing && existing.remove(), overlayTimeout && (clearTimeout(overlayTimeout),
123+
existing && existing.remove(), overlayTimeout && (clearTimeout(overlayTimeout),
124124
overlayTimeout = null);
125125
}
126-
}();
126+
}();

0 commit comments

Comments
 (0)