-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathindex.html
More file actions
137 lines (128 loc) · 6.04 KB
/
index.html
File metadata and controls
137 lines (128 loc) · 6.04 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!doctype html>
<html lang="en" dir="auto">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/deriv-logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<!-- PWA Manifest -->
<link rel="manifest" href="/manifest.json" />
<!-- PWA Meta Tags -->
<meta name="theme-color" content="#ff444f" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<meta name="apple-mobile-web-app-title" content="Deriv Bot" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="msapplication-TileColor" content="#ff444f" />
<meta name="msapplication-tap-highlight" content="no" />
<!-- Apple Touch Icons -->
<link rel="apple-touch-icon" href="/assets/icons/pwa/icon-152x152.png" />
<link rel="apple-touch-icon" sizes="152x152" href="/assets/icons/pwa/icon-152x152.png" />
<link rel="apple-touch-icon" sizes="180x180" href="/assets/icons/pwa/icon-192x192.png" />
<meta name="title" content="Build a trading bot without coding | Deriv Bot." />
<meta
name="description"
content="Import your current bot or learn how to create a trading bot from scratch with our detailed guides, FAQs, and tutorials. Start with a quick strategy!"
/>
<meta property="og:title" content="Deriv Bot" />
<meta
property="og:description"
content="Import your current bot or learn how to create a trading bot from scratch with our detailed guides, FAQs, and tutorials. Start with a quick strategy!"
/>
<title>Build a trading bot without coding | Deriv Bot.</title>
<style>
:root {
font-size: 62.5%;
}
</style>
</head>
<body class="body theme theme--light">
<div id="modal_root" class="modal-root"></div>
<div id="popup_root" class="popup-root"></div>
<div id="root"></div>
<!-- LiveChat script -->
<script type="text/javascript" defer>
window.__lc = window.__lc || {};
window.__lc.license = 12049137;
window.__lc.asyncInit = true;
(function (n, t, c) {
function i(n) {
return e._h ? e._h.apply(null, n) : e._q.push(n);
}
var e = {
_q: [],
_h: null,
_v: '2.0',
on: function () {
i(['on', c.call(arguments)]);
},
once: function () {
i(['once', c.call(arguments)]);
},
off: function () {
i(['off', c.call(arguments)]);
},
get: function () {
if (!e._h) throw new Error('[LiveChatWidget] You can’t use getters before load.');
return i(['get', c.call(arguments)]);
},
call: function () {
i(['call', c.call(arguments)]);
},
init: function () {
setTimeout(() => {
var n = t.createElement('script');
((n.async = !0),
(n.type = 'text/javascript'),
(n.src = 'https://cdn.livechatinc.com/tracking.js'),
t.head.appendChild(n));
}, 3000);
},
};
(!n.__lc.asyncInit && e.init(), (n.LiveChatWidget = n.LiveChatWidget || e));
})(window, document, [].slice);
</script>
<!-- End LiveChat script -->
<!-- Browser Service Worker Prevention -->
<script>
// Check browser compatibility and prevent service worker issues
const userAgent = navigator.userAgent.toLowerCase();
const isFirefox = userAgent.includes('firefox');
const isSafari = userAgent.includes('safari') && !userAgent.includes('chrome');
const shouldSkipSW = isFirefox || isSafari;
if (shouldSkipSW) {
const browserName = isFirefox ? 'Firefox' : 'Safari';
console.log(
`[HTML] ${browserName} detected - preventing service worker registration to avoid chunk loading issues`
);
// Cleanup any existing service workers
if ('serviceWorker' in navigator) {
navigator.serviceWorker
.getRegistrations()
.then(registrations => {
registrations.forEach(registration => {
console.log(`[HTML] Unregistering existing SW for ${browserName}:`, registration.scope);
registration.unregister();
});
})
.catch(error => {
console.error('[HTML] Failed to cleanup service workers:', error);
});
}
}
// Check online/offline status
console.log('[HTML] Online status:', navigator.onLine);
window.addEventListener('online', () => {
console.log('[HTML] Back online');
});
window.addEventListener('offline', () => {
console.log('[HTML] Gone offline');
});
// Listen for service worker messages if registered by PWA utils (non-problematic browsers only)
if ('serviceWorker' in navigator && !shouldSkipSW) {
navigator.serviceWorker.addEventListener('message', event => {
console.log('[HTML] Message from service worker:', event.data);
});
}
</script>
</body>
</html>