Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 47 additions & 47 deletions latest_release.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
{
"url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/273122615",
"assets_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/273122615/assets",
"upload_url": "https://uploads.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/273122615/assets{?name,label}",
"html_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/tag/v2.0.7",
"id": 273122615,
"url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/274400382",
"assets_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/274400382/assets",
"upload_url": "https://uploads.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/274400382/assets{?name,label}",
"html_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/tag/v2.2.0",
"id": 274400382,
"author": {
"login": "github-actions[bot]",
"id": 41898282,
"node_id": "MDM6Qm90NDE4OTgyODI=",
"avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4",
"login": "rcholic",
"id": 135060,
"node_id": "MDQ6VXNlcjEzNTA2MA==",
"avatar_url": "https://avatars.githubusercontent.com/u/135060?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/github-actions%5Bbot%5D",
"html_url": "https://github.com/apps/github-actions",
"followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers",
"following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}",
"gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}",
"starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions",
"organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs",
"repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos",
"events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}",
"received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events",
"type": "Bot",
"url": "https://api.github.com/users/rcholic",
"html_url": "https://github.com/rcholic",
"followers_url": "https://api.github.com/users/rcholic/followers",
"following_url": "https://api.github.com/users/rcholic/following{/other_user}",
"gists_url": "https://api.github.com/users/rcholic/gists{/gist_id}",
"starred_url": "https://api.github.com/users/rcholic/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rcholic/subscriptions",
"organizations_url": "https://api.github.com/users/rcholic/orgs",
"repos_url": "https://api.github.com/users/rcholic/repos",
"events_url": "https://api.github.com/users/rcholic/events{/privacy}",
"received_events_url": "https://api.github.com/users/rcholic/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
},
"node_id": "RE_kwDOQshiJ84QR4U3",
"tag_name": "v2.0.7",
"node_id": "RE_kwDOQshiJ84QWwR-",
"tag_name": "v2.2.0",
"target_commitish": "main",
"name": "Release v2.0.7",
"name": "Release v2.2.0",
"draft": false,
"immutable": false,
"prerelease": false,
"created_at": "2025-12-29T03:56:13Z",
"updated_at": "2025-12-29T03:57:09Z",
"published_at": "2025-12-29T03:57:08Z",
"created_at": "2026-01-06T03:10:35Z",
"updated_at": "2026-01-06T03:16:45Z",
"published_at": "2026-01-06T03:16:10Z",
"assets": [
{
"url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/333966751",
"id": 333966751,
"node_id": "RA_kwDOQshiJ84T5-2f",
"url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/336823100",
"id": 336823100,
"node_id": "RA_kwDOQshiJ84UE4M8",
"name": "extension-files.tar.gz",
"label": "",
"uploader": {
Expand All @@ -65,17 +65,17 @@
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 78091,
"digest": "sha256:e281f8b755b61da4b8015d6172064aa9a337c14133ceceff4ab29199ee53307e",
"download_count": 9,
"created_at": "2025-12-29T03:57:09Z",
"updated_at": "2025-12-29T03:57:09Z",
"browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.0.7/extension-files.tar.gz"
"size": 72250,
"digest": "sha256:adb68bd89b417f23f32c029c6cf045cc3677588e6a7760b7c8d0deb7e2601dd1",
"download_count": 2,
"created_at": "2026-01-06T03:16:44Z",
"updated_at": "2026-01-06T03:16:45Z",
"browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.2.0/extension-files.tar.gz"
},
{
"url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/333966752",
"id": 333966752,
"node_id": "RA_kwDOQshiJ84T5-2g",
"url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/336823099",
"id": 336823099,
"node_id": "RA_kwDOQshiJ84UE4M7",
"name": "extension-package.zip",
"label": "",
"uploader": {
Expand All @@ -101,15 +101,15 @@
},
"content_type": "application/zip",
"state": "uploaded",
"size": 80179,
"digest": "sha256:a025edeb8b6d05bfb25c57f913b68507060653ecbdf616000a46df4cb8dec377",
"size": 73962,
"digest": "sha256:7483812c016842fb02add2d6c8d887e321cb9eb89030fee016cf4ea9f812f4bf",
"download_count": 0,
"created_at": "2025-12-29T03:57:09Z",
"updated_at": "2025-12-29T03:57:09Z",
"browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.0.7/extension-package.zip"
"created_at": "2026-01-06T03:16:44Z",
"updated_at": "2026-01-06T03:16:45Z",
"browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.2.0/extension-package.zip"
}
],
"tarball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/tarball/v2.0.7",
"zipball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/zipball/v2.0.7",
"body": "**Full Changelog**: https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/compare/v2.0.6...v2.0.7"
"tarball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/tarball/v2.2.0",
"zipball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/zipball/v2.2.0",
"body": ""
}
6 changes: 3 additions & 3 deletions sentience/extension/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ async function handleSnapshotProcessing(rawData, options = {}) {
const startTime = performance.now();
try {
if (!Array.isArray(rawData)) throw new Error("rawData must be an array");
if (rawData.length > 1e4 && (rawData = rawData.slice(0, 1e4)), await initWASM(),
if (rawData.length > 1e4 && (rawData = rawData.slice(0, 1e4)), await initWASM(),
!wasmReady) throw new Error("WASM module not initialized");
let analyzedElements, prunedRawData;
try {
const wasmPromise = new Promise((resolve, reject) => {
try {
let result;
result = options.limit || options.filter ? analyze_page_with_options(rawData, options) : analyze_page(rawData),
result = options.limit || options.filter ? analyze_page_with_options(rawData, options) : analyze_page(rawData),
resolve(result);
} catch (e) {
reject(e);
Expand Down Expand Up @@ -101,4 +101,4 @@ initWASM().catch(err => {}), chrome.runtime.onMessage.addListener((request, send
event.preventDefault();
}), self.addEventListener("unhandledrejection", event => {
event.preventDefault();
});
});
12 changes: 6 additions & 6 deletions sentience/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
if (!elements || !Array.isArray(elements)) return;
removeOverlay();
const host = document.createElement("div");
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 ",
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 ",
document.body.appendChild(host);
const shadow = host.attachShadow({
mode: "closed"
Expand All @@ -94,15 +94,15 @@
let color;
color = isTarget ? "#FF0000" : isPrimary ? "#0066FF" : "#00FF00";
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");
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 `,
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 `,
importance > 0 || isPrimary) {
const badge = document.createElement("span");
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 `,
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 `,
box.appendChild(badge);
}
if (isTarget) {
const targetIndicator = document.createElement("span");
targetIndicator.textContent = "🎯", targetIndicator.style.cssText = "\n position: absolute;\n top: -18px;\n right: 0;\n font-size: 16px;\n pointer-events: none;\n ",
targetIndicator.textContent = "🎯", targetIndicator.style.cssText = "\n position: absolute;\n top: -18px;\n right: 0;\n font-size: 16px;\n pointer-events: none;\n ",
box.appendChild(targetIndicator);
}
shadow.appendChild(box);
Expand All @@ -120,7 +120,7 @@
let overlayTimeout = null;
function removeOverlay() {
const existing = document.getElementById(OVERLAY_HOST_ID);
existing && existing.remove(), overlayTimeout && (clearTimeout(overlayTimeout),
existing && existing.remove(), overlayTimeout && (clearTimeout(overlayTimeout),
overlayTimeout = null);
}
}();
}();
Loading
Loading