Skip to content
Closed
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
8 changes: 7 additions & 1 deletion sentience-chrome/content.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// content.js - ISOLATED WORLD (Bridge between Main World and Background)
console.log('[Sentience Bridge] Loaded.');

// Detect if we're in a child frame (for iframe support)
const isChildFrame = window !== window.top;
if (isChildFrame) {
console.log('[Sentience Bridge] Running in child frame:', window.location.href);
}

// 1. Pass Extension ID to Main World (So API knows where to find resources)
document.documentElement.dataset.sentienceExtensionId = chrome.runtime.id;

Expand Down Expand Up @@ -94,7 +100,7 @@ function handleSnapshotRequest(data) {
}

if (response?.success) {
// console.log(`[Sentience Bridge] ✓ WASM processing complete in ${duration.toFixed(1)}ms`);
console.log(`[Sentience Bridge] ✓ WASM processing complete in ${duration.toFixed(1)}ms`);
window.postMessage({
type: 'SENTIENCE_SNAPSHOT_RESULT',
requestId: data.requestId,
Expand Down
Loading
Loading