From e47623c00192ebe71eefe0f857561e0081b3e65f Mon Sep 17 00:00:00 2001 From: rcholic Date: Sun, 28 Dec 2025 05:48:37 +0000 Subject: [PATCH] chore: sync extension files from sentience-chrome v2.0.4 --- sentience-chrome/injected_api.js | 14 ++++- sentience-chrome/manifest.json | 2 +- sentience-chrome/release.json | 93 ++++++++++++++++---------------- 3 files changed, 60 insertions(+), 49 deletions(-) diff --git a/sentience-chrome/injected_api.js b/sentience-chrome/injected_api.js index a47ad554..1cff1d6e 100644 --- a/sentience-chrome/injected_api.js +++ b/sentience-chrome/injected_api.js @@ -726,9 +726,15 @@ } console.log(`[SentienceAPI] Found ${iframes.length} iframe(s), requesting snapshots...`); - // Request snapshot from each iframe const iframePromises = iframes.map((iframe, idx) => { + // OPTIMIZATION: Skip common ad domains to save time + const src = iframe.src || ''; + if (src.includes('doubleclick') || src.includes('googleadservices') || src.includes('ads system')) { + console.log(`[SentienceAPI] Skipping ad iframe: ${src.substring(0, 30)}...`); + return Promise.resolve(null); + } + return new Promise((resolve) => { const requestId = `iframe-${idx}-${Date.now()}`; @@ -736,7 +742,7 @@ const timeout = setTimeout(() => { console.warn(`[SentienceAPI] ⚠️ Iframe ${idx} snapshot TIMEOUT (id: ${requestId})`); resolve(null); - }, 10000); // Increased to 10s to handle slow processing + }, 5000); // Increased to 5s to handle slow processing // 2. ROBUST LISTENER with debugging const listener = (event) => { @@ -1036,6 +1042,10 @@ return { status: "success", url: window.location.href, + viewport: { + width: window.innerWidth, + height: window.innerHeight + }, elements: cleanedElements, raw_elements: cleanedRawElements, screenshot: screenshot diff --git a/sentience-chrome/manifest.json b/sentience-chrome/manifest.json index 7e44a1ca..e55a0356 100644 --- a/sentience-chrome/manifest.json +++ b/sentience-chrome/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "Sentience Semantic Visual Grounding Extractor", - "version": "2.0.2", + "version": "2.0.4", "description": "Extract semantic visual grounding data from web pages", "permissions": ["activeTab", "scripting"], "host_permissions": [""], diff --git a/sentience-chrome/release.json b/sentience-chrome/release.json index 048c34d5..e3db148a 100644 --- a/sentience-chrome/release.json +++ b/sentience-chrome/release.json @@ -1,45 +1,45 @@ { - "url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/273025127", - "assets_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/273025127/assets", - "upload_url": "https://uploads.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/273025127/assets{?name,label}", - "html_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/tag/v2.0.3", - "id": 273025127, + "url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/273046101", + "assets_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/273046101/assets", + "upload_url": "https://uploads.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/273046101/assets{?name,label}", + "html_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/tag/v2.0.4", + "id": 273046101, "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_kwDOQshiJ84QRghn", - "tag_name": "v2.0.3", + "node_id": "RE_kwDOQshiJ84QRlpV", + "tag_name": "v2.0.4", "target_commitish": "main", - "name": "Release v2.0.3", + "name": "Release v2.0.4", "draft": false, "immutable": false, "prerelease": false, - "created_at": "2025-12-27T01:12:14Z", - "updated_at": "2025-12-27T22:46:31Z", - "published_at": "2025-12-27T22:46:13Z", + "created_at": "2025-12-28T05:42:53Z", + "updated_at": "2025-12-28T05:44:58Z", + "published_at": "2025-12-28T05:44:57Z", "assets": [ { - "url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/333567799", - "id": 333567799, - "node_id": "RA_kwDOQshiJ84T4dc3", + "url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/333683577", + "id": 333683577, + "node_id": "RA_kwDOQshiJ84T45t5", "name": "extension-files.tar.gz", "label": "", "uploader": { @@ -65,17 +65,17 @@ }, "content_type": "application/gzip", "state": "uploaded", - "size": 73434, - "digest": "sha256:ca93cdaf875792eb22333f7ba5b13dd129552f388900e624422e73959338d8fb", + "size": 73579, + "digest": "sha256:664d4476dc5741e0df63d6264db43a63b9ab2a4deac3049a1e61e084ebf2639c", "download_count": 0, - "created_at": "2025-12-27T22:46:31Z", - "updated_at": "2025-12-27T22:46:31Z", - "browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.0.3/extension-files.tar.gz" + "created_at": "2025-12-28T05:44:58Z", + "updated_at": "2025-12-28T05:44:58Z", + "browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.0.4/extension-files.tar.gz" }, { - "url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/333567800", - "id": 333567800, - "node_id": "RA_kwDOQshiJ84T4dc4", + "url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/333683578", + "id": 333683578, + "node_id": "RA_kwDOQshiJ84T45t6", "name": "extension-package.zip", "label": "", "uploader": { @@ -101,15 +101,16 @@ }, "content_type": "application/zip", "state": "uploaded", - "size": 75584, - "digest": "sha256:291750ec174d9aadade298d2a2aa1057d08a138e2650c97cd93d56b6bcbee713", + "size": 75736, + "digest": "sha256:b817ac0bba53872e6f725b38e16063c476790b8498953c1bec3d645ebcbebfb4", "download_count": 0, - "created_at": "2025-12-27T22:46:31Z", - "updated_at": "2025-12-27T22:46:31Z", - "browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.0.3/extension-package.zip" + "created_at": "2025-12-28T05:44:58Z", + "updated_at": "2025-12-28T05:44:58Z", + "browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.0.4/extension-package.zip" } ], - "tarball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/tarball/v2.0.3", - "zipball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/zipball/v2.0.3", - "body": "" + "tarball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/tarball/v2.0.4", + "zipball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/zipball/v2.0.4", + "body": "## What's Changed\n* short iframe wait form 10 to 5; skip ad junk sites by @rcholic in https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/pull/18\n\n\n**Full Changelog**: https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/compare/v2.0.2...v2.0.4", + "mentions_count": 1 }