-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
60 lines (55 loc) · 2.25 KB
/
Copy pathindex.html
File metadata and controls
60 lines (55 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="Synapse transforms complex content into accessible, reader-first experiences using Chrome's built-in AI APIs."
/>
<meta name="theme-color" content="#3b82f6" />
<title>Synapse · Chrome AI Accessibility Workspace</title>
<!-- Early Browser Compatibility Detection -->
<script>
(function() {
// Minimum Chrome version required
const MIN_CHROME_VERSION = 130;
// Early browser detection (runs before React loads)
const userAgent = navigator.userAgent;
const chromeMatch = userAgent.match(/Chrome\/(\d+)/);
const isEdge = userAgent.includes('Edg/') || userAgent.includes('Edge/');
const isChrome = chromeMatch !== null && !isEdge;
const chromeVersion = chromeMatch ? parseInt(chromeMatch[1]) : null;
// Store browser info in sessionStorage for app to use
const browserInfo = {
isChrome: isChrome,
version: chromeVersion,
meetsMinimumVersion: chromeVersion !== null && chromeVersion >= MIN_CHROME_VERSION,
userAgent: userAgent,
detectedAt: new Date().toISOString()
};
try {
sessionStorage.setItem('early-browser-detection', JSON.stringify(browserInfo));
} catch (e) {
// SessionStorage might not be available, continue anyway
console.warn('Could not store browser detection info:', e);
}
// Log browser compatibility info to console (helpful for debugging)
if (!isChrome) {
console.warn('⚠️ Chrome browser is required for AI features');
} else if (!browserInfo.meetsMinimumVersion) {
console.warn(
`⚠️ Chrome ${chromeVersion} detected. Chrome ${MIN_CHROME_VERSION}+ is required for AI features.`
);
} else {
console.info('✓ Browser meets minimum Chrome AI requirements');
}
})();
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>