Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
80 lines (77 loc) · 3.41 KB
/
Copy pathindex.html
File metadata and controls
80 lines (77 loc) · 3.41 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-CZKRW5KJRS"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
// Resolve q_group_id: query string -> hash query string -> sessionStorage -> default.
// Computed outside any try/catch-around-everything so the fallback ALWAYS applies.
var groupId = 'independent_visit';
try {
var hashQuery = location.hash.indexOf('?') > -1 ? location.hash.slice(location.hash.indexOf('?')) : '';
var rawParam = new URLSearchParams(window.location.search).get('q_group_id')
|| new URLSearchParams(hashQuery).get('q_group_id');
var storedId = null;
try { storedId = sessionStorage.getItem('q_group_id'); } catch (e) { }
var resolved = (rawParam && rawParam.trim()) || (storedId && storedId.trim());
if (resolved) groupId = resolved;
try { sessionStorage.setItem('q_group_id', groupId); } catch (e) { }
} catch (e) { }
window.__groupId = groupId;
// Guarantee q_group_id on EVERY event, whatever the call site (inline onclick
// handlers included) and however early/late it fires. An explicit value wins.
(function () {
var rawGtag = gtag;
gtag = function (cmd, name, params) {
if (cmd === 'event') {
params = params || {};
if (!params.q_group_id) params.q_group_id = window.__groupId;
return rawGtag.call(this, cmd, name, params);
}
return rawGtag.apply(this, arguments);
};
})();
gtag('set', { 'q_group_id': groupId });
// Also on the config call so it is present from the very first hit
gtag('config', 'G-CZKRW5KJRS', { send_page_view: false, q_group_id: groupId });
</script>
<meta charset="UTF-8" />
<meta name="referrer" content="unsafe-url" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>BrowserStack Demo Hub</title>
<link rel="icon" type="image/svg+xml" href="icons/browserstack-mark.svg" />
<link rel="stylesheet" href="styles.css?v=9" />
<link rel="stylesheet" href="achievements.css?v=2" />
<link rel="stylesheet" href="achievement-detail.css?v=1" />
</head>
<body>
<nav class="navbar">
<div class="brand" onclick="location.hash='#/'">
<div class="logo">
<img class="logo-light" src="icons/browserstack-logo.svg" alt="BrowserStack" height="26" />
<img class="logo-dark" src="icons/browserstack-logo-dark.svg" alt="" aria-hidden="true" height="26" />
</div>
<b>Demo Hub</b>
</div>
<div class="nav-search-wrap">
<input type="search" id="globalSearch" class="nav-search" placeholder="Search videos (Press '/' to reach here)" autocomplete="off" aria-label="Search videos" />
<span class="nav-search-icon">🔍</span>
</div>
<div class="nav-right">
<button class="dark-toggle" id="darkToggle" aria-label="Toggle dark mode" title="Toggle dark mode">
<span class="toggle-icon">🌙</span>
</button>
<a class="nav-cta" onclick="location.hash='#/'">All Products</a>
</div>
</nav>
<div class="wrap" id="app"></div>
<script src="data.js"></script>
<script src="releases.js?v=4"></script>
<script src="achievements.js?v=2"></script>
<script src="achievement-detail.js?v=1"></script>
<script src="app.js?v=6"></script>
</body>
</html>