diff --git a/sentience/extension/injected_api.js b/sentience/extension/injected_api.js index 80b3404..f8c1ec1 100644 --- a/sentience/extension/injected_api.js +++ b/sentience/extension/injected_api.js @@ -323,6 +323,12 @@ if (!el.getBoundingClientRect) return; const rect = el.getBoundingClientRect(); if (rect.width < 5 || rect.height < 5) return; + if ("span" === el.tagName.toLowerCase()) { + if (el.closest("a")) return; + const childLink = el.querySelector("a[href]"); + if (childLink && childLink.href) return; + options.debug && el.className && el.className.includes("titleline"); + } window.sentience_registry[idx] = el; const semanticText = function(el, options = {}) { if (!el) return { @@ -439,7 +445,7 @@ inferred_label: semanticText?.source && ![ "explicit_aria_label", "input_value", "img_alt", "inner_text" ].includes(semanticText.source) ? toSafeString(semanticText.text) : null, label_source: semanticText?.source || null, inferred_role: inferredRole ? toSafeString(inferredRole) : null, - href: toSafeString(el.href || el.getAttribute("href") || null), + href: toSafeString(el.href || el.getAttribute("href") || el.closest && el.closest("a")?.href || null), class: toSafeString(getClassName(el)), value: void 0 !== el.value ? toSafeString(el.value) : toSafeString(el.getAttribute("value")), checked: void 0 !== el.checked ? String(el.checked) : null diff --git a/sentience/extension/manifest.json b/sentience/extension/manifest.json index 4eaf8b2..7c821a4 100644 --- a/sentience/extension/manifest.json +++ b/sentience/extension/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "Sentience Semantic Visual Grounding Extractor", - "version": "2.3.0", + "version": "2.4.0", "description": "Extract semantic visual grounding data from web pages", "permissions": ["activeTab", "scripting"], "host_permissions": [""], diff --git a/sentience/extension/pkg/sentience_core_bg.wasm b/sentience/extension/pkg/sentience_core_bg.wasm index 78c777c..77c665a 100644 Binary files a/sentience/extension/pkg/sentience_core_bg.wasm and b/sentience/extension/pkg/sentience_core_bg.wasm differ diff --git a/sentience/extension/release.json b/sentience/extension/release.json index 973b49c..0fe8f5a 100644 --- a/sentience/extension/release.json +++ b/sentience/extension/release.json @@ -1,45 +1,45 @@ { - "url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/275742777", - "assets_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/275742777/assets", - "upload_url": "https://uploads.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/275742777/assets{?name,label}", - "html_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/tag/v2.3.0", - "id": 275742777, + "url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/275780781", + "assets_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/275780781/assets", + "upload_url": "https://uploads.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/275780781/assets{?name,label}", + "html_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/tag/v2.4.0", + "id": 275780781, "author": { - "login": "rcholic", - "id": 135060, - "node_id": "MDQ6VXNlcjEzNTA2MA==", - "avatar_url": "https://avatars.githubusercontent.com/u/135060?v=4", + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", - "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", + "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", "user_view_type": "public", "site_admin": false }, - "node_id": "RE_kwDOQshiJ84Qb4A5", - "tag_name": "v2.3.0", + "node_id": "RE_kwDOQshiJ84QcBSt", + "tag_name": "v2.4.0", "target_commitish": "main", - "name": "Release v2.3.0", + "name": "Release v2.4.0", "draft": false, "immutable": false, "prerelease": false, - "created_at": "2026-01-10T19:58:22Z", - "updated_at": "2026-01-10T19:59:50Z", - "published_at": "2026-01-10T19:59:16Z", + "created_at": "2026-01-11T03:04:44Z", + "updated_at": "2026-01-11T03:07:27Z", + "published_at": "2026-01-11T03:06:49Z", "assets": [ { - "url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/338832607", - "id": 338832607, - "node_id": "RA_kwDOQshiJ84UMizf", + "url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/338955721", + "id": 338955721, + "node_id": "RA_kwDOQshiJ84UNA3J", "name": "extension-files.tar.gz", "label": "", "uploader": { @@ -65,17 +65,17 @@ }, "content_type": "application/gzip", "state": "uploaded", - "size": 73652, - "digest": "sha256:8b2c505a4d0943365b683bb791356cfd33398499039f6a1e9cb1ade4e4d95949", + "size": 73936, + "digest": "sha256:8e15a80621f3494616a751764e98a935933cea18b88423121d9f4373f0766306", "download_count": 0, - "created_at": "2026-01-10T19:59:50Z", - "updated_at": "2026-01-10T19:59:50Z", - "browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.3.0/extension-files.tar.gz" + "created_at": "2026-01-11T03:06:50Z", + "updated_at": "2026-01-11T03:06:50Z", + "browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.4.0/extension-files.tar.gz" }, { - "url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/338832606", - "id": 338832606, - "node_id": "RA_kwDOQshiJ84UMize", + "url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/338955720", + "id": 338955720, + "node_id": "RA_kwDOQshiJ84UNA3I", "name": "extension-package.zip", "label": "", "uploader": { @@ -101,15 +101,16 @@ }, "content_type": "application/zip", "state": "uploaded", - "size": 75735, - "digest": "sha256:892f9a843859bdba36d8aea8bbe727c07ebeea17d925b785cbbc0b33c8aa16c4", + "size": 76016, + "digest": "sha256:56dcf5134d47ed4ab8025fb81c21946acf51461baa6973a60ea59727d6d44351", "download_count": 0, - "created_at": "2026-01-10T19:59:50Z", - "updated_at": "2026-01-10T19:59:50Z", - "browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.3.0/extension-package.zip" + "created_at": "2026-01-11T03:06:49Z", + "updated_at": "2026-01-11T03:06:50Z", + "browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.4.0/extension-package.zip" } ], - "tarball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/tarball/v2.3.0", - "zipball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/zipball/v2.3.0", - "body": "" + "tarball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/tarball/v2.4.0", + "zipball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/zipball/v2.4.0", + "body": "## What's Changed\r\n* Structural tags by @rcholic in https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/pull/28\r\n\r\n\r\n**Full Changelog**: https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/compare/v2.3.0...v2.4.0", + "mentions_count": 1 }