-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9dd9c56
commit 048fb9a
Showing
2,360 changed files
with
115,178 additions
and
168,374 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<!DOCTYPE html><!-- Last Published: Fri Nov 15 2024 09:50:43 GMT+0000 (Coordinated Universal Time) --> | ||
<!DOCTYPE html><!-- Last Published: Wed Nov 20 2024 08:53:21 GMT+0000 (Coordinated Universal Time) --> | ||
<html data-wf-domain="%%PUBLISH_URL_REPLACEMENT%%" data-wf-page="66585fe0e1dc7e70cc75d4b9" data-wf-site="66585fe0e1dc7e70cc75d440" lang="en"> | ||
|
||
<head> | ||
|
@@ -11,7 +11,6 @@ | |
<link rel="alternate" hrefLang="pt" href="https://deriv.com/pt/404" /> | ||
<link rel="alternate" hrefLang="es" href="https://deriv.com/es/404" /> | ||
<link rel="alternate" hrefLang="ru" href="https://deriv.com/ru/404" /> | ||
<link rel="alternate" hrefLang="th" href="https://deriv.com/th/404" /> | ||
<link rel="alternate" hrefLang="vi" href="https://deriv.com/vi/404" /> | ||
<link rel="alternate" hrefLang="bn" href="https://deriv.com/bn/404" /> | ||
<link rel="alternate" hrefLang="si" href="https://deriv.com/si/404" /> | ||
|
@@ -26,7 +25,7 @@ | |
<meta content="Not Found" property="og:title" /> | ||
<meta content="Not Found" property="twitter:title" /> | ||
<meta content="width=device-width, initial-scale=1" name="viewport" /> | ||
<link href="https://cdn.prod.website-files.com/66585fe0e1dc7e70cc75d440/css/deriv-staged-2dfc316890fbbd8e3ed6d351bd.00e172144.min.css" rel="stylesheet" type="text/css" /> | ||
<link href="https://cdn.prod.website-files.com/66585fe0e1dc7e70cc75d440/css/deriv-staged-2dfc316890fbbd8e3ed6d351bd.fea7aaff5.min.css" rel="stylesheet" type="text/css" /> | ||
<link href="https://fonts.googleapis.com" rel="preconnect" /> | ||
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin="anonymous" /> | ||
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js" type="text/javascript"></script> | ||
|
@@ -50,7 +49,7 @@ | |
<link rel="stylesheet" href="https://unpkg.com/@deriv-com/[email protected]/dist/css/styles.min.css" /> | ||
<!--Analytics block starts here--> | ||
<script> | ||
// Version 1.0.6 | ||
// Version 1.0.12 | ||
const cacheTrackEvents = { | ||
interval: null, | ||
responses: [], | ||
|
@@ -129,9 +128,12 @@ | |
method: this._method, | ||
status: this.status, | ||
headers: this.getAllResponseHeaders(), | ||
data: this.responseText, | ||
data: this.responseType === "" || this.responseType === "text" ? | ||
this.responseText : | ||
null, | ||
payload: parsedPayload, | ||
}; | ||
|
||
cacheTrackEvents.responses.push(responseData); | ||
}); | ||
|
||
|
@@ -152,6 +154,7 @@ | |
acc[decodeURIComponent(key)] = decodeURIComponent(value); | ||
return acc; | ||
}, {}); | ||
|
||
try { | ||
return cookies[cookieName] ? JSON.parse(cookies[cookieName]) : null; | ||
} catch (error) { | ||
|
@@ -187,7 +190,6 @@ | |
event.properties.email_hash = cacheTrackEvents.hash(email); | ||
} | ||
} | ||
|
||
if (event?.properties?.email) { | ||
const email = event.properties.email; | ||
delete event.properties.email; | ||
|
@@ -226,6 +228,9 @@ | |
window.Analytics?.Analytics?.pageView(window.location.href, { | ||
loggedIn: !!clientInfo, | ||
device_type: signupDevice, | ||
network_type: window?.navigator?.connection?.effectiveType, | ||
network_rtt: window?.navigator?.connection?.rtt, | ||
network_downlink: window?.navigator?.connection?.downlink, | ||
}); | ||
} | ||
|
||
|
@@ -307,16 +312,19 @@ | |
}, | ||
loadEvent: (items) => { | ||
items.forEach(({ | ||
event | ||
event, | ||
cache | ||
}) => { | ||
const { | ||
name, | ||
properties | ||
} = event; | ||
cacheTrackEvents.track({ | ||
name, | ||
properties, | ||
}); | ||
name, | ||
properties, | ||
}, | ||
cache | ||
); | ||
}); | ||
|
||
return cacheTrackEvents; | ||
|
@@ -354,6 +362,30 @@ | |
|
||
return cacheTrackEvents; | ||
}, | ||
trackConsoleErrors: (callback) => { | ||
const originalConsoleError = console.error; | ||
console.error = function(...args) { | ||
// Log the error to the console as usual | ||
originalConsoleError.apply(console, args); | ||
|
||
// Create a clean error message without __trackjs_state__ | ||
const errorMessage = args | ||
.map((arg) => | ||
arg && typeof arg === "object" && arg.message ? | ||
arg.message : | ||
typeof arg === "object" ? | ||
JSON.stringify(arg, (key, value) => | ||
key.startsWith("__trackjs") ? undefined : value | ||
) : | ||
String(arg) | ||
) | ||
.join(" "); | ||
|
||
if (typeof callback === "function") { | ||
callback(errorMessage); | ||
} | ||
}; | ||
}, | ||
}; | ||
|
||
cacheTrackEvents | ||
|
@@ -707,7 +739,8 @@ | |
var deriv_cookie_domain = "deriv.com"; // Modify as per your actual usage | ||
var CookieStorage = function(cookie_name, cookie_domain = "") { | ||
var hostname = window.location.hostname; | ||
var is_deriv_com = hostname.includes("deriv.com"); | ||
var is_deriv_com = | ||
hostname === "deriv.com" || hostname === "staging.deriv.com"; | ||
this.initialized = false; | ||
this.cookie_name = cookie_name; | ||
this.domain = is_deriv_com ? | ||
|
@@ -830,10 +863,10 @@ | |
window.growthbook_config = { | ||
"uuidCookieName": "gbuuid", | ||
"uuidKey": "id", | ||
"uuid": "cc18c781-3e22-4a67-a98b-ec402961564f", | ||
"uuid": "1b7e0799-59ac-49b5-8bf0-467769548419", | ||
"persistUuidOnLoad": true, | ||
"attributes": { | ||
"id": "cc18c781-3e22-4a67-a98b-ec402961564f", | ||
"id": "1b7e0799-59ac-49b5-8bf0-467769548419", | ||
"browser": "unknown", | ||
"deviceType": "desktop", | ||
"url": "https://deriv.com/404?fromWorker=true", | ||
|
@@ -871,6 +904,13 @@ | |
} | ||
}, | ||
"force": true | ||
}, { | ||
"condition": { | ||
"country": { | ||
"$in": ["ng", "za", "zw", "jm", "co", "br", "pk", "in", "us", "tz", "gh"] | ||
} | ||
}, | ||
"force": true | ||
}] | ||
} | ||
}, | ||
|
@@ -1191,7 +1231,7 @@ | |
"phase": "0", | ||
"coverage": 1 | ||
}], | ||
"dateUpdated": "2024-11-15T17:55:26.481Z" | ||
"dateUpdated": "2024-11-19T08:14:17.785Z" | ||
}, | ||
"disableVisualExperiments": false, | ||
"disableJsInjection": false, | ||
|
@@ -3275,8 +3315,8 @@ <h3 class="_404-heading">We couldn’t find that page</h3> | |
</div> | ||
</div> | ||
<script src="https://d3e54v103j8qbb.cloudfront.net/js/jquery-3.5.1.min.dc5e7f18c8.js?site=66585fe0e1dc7e70cc75d440" type="text/javascript" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script> | ||
<script src="https://cdn.prod.website-files.com/66585fe0e1dc7e70cc75d440/js/deriv-staged-2dfc316890fbbd8e3ed6d351bd.f084eff40.js" type="text/javascript"></script><!-- deriv js custom code script--> | ||
<script type="module" src="https://unpkg.com/@deriv-com/custom-scripts@1.22.0/dist/js/footer_scripts.min.js"></script> | ||
<script src="https://cdn.prod.website-files.com/66585fe0e1dc7e70cc75d440/js/deriv-staged-2dfc316890fbbd8e3ed6d351bd.a9885b921.js" type="text/javascript"></script><!-- deriv js custom code script--> | ||
<script type="module" src="https://unpkg.com/@deriv-com/custom-scripts@1.23.0/dist/js/footer_scripts.min.js"></script> | ||
<!-- deriv js custom code script end--> | ||
|
||
<script> | ||
|
@@ -3492,24 +3532,37 @@ <h3 class="_404-heading">We couldn’t find that page</h3> | |
//end of dashboard send data | ||
|
||
// Start: FreshChat load function | ||
const loadFreshChatScript = (callback) => { | ||
const script = document.createElement("script"); | ||
script.src = "https://static.deriv.com/scripts/freshchat.js?v=1"; | ||
script.async = true; | ||
const loadFreshChatScript = (callback, maxRetries = 3, retryDelay = 2000) => { | ||
let retryCount = 0; | ||
|
||
// Callback when the script is loaded | ||
script.onload = () => { | ||
if (typeof callback === "function") { | ||
callback(); | ||
} | ||
}; | ||
const loadScript = () => { | ||
const script = document.createElement("script"); | ||
script.src = "https://static.deriv.com/scripts/freshchat.js?v=1"; | ||
script.async = true; | ||
|
||
script.onload = () => { | ||
if (typeof callback === "function") { | ||
callback(); | ||
} | ||
}; | ||
|
||
script.onerror = () => { | ||
console.error("Failed to load Freshchat script"); | ||
script.onerror = () => { | ||
if (retryCount < maxRetries) { | ||
retryCount++; | ||
setTimeout(loadScript, retryDelay); | ||
} else { | ||
console.warn( | ||
"Freshchat script could not be loaded after maximum retries." | ||
); | ||
} | ||
}; | ||
|
||
document.head.appendChild(script); | ||
}; | ||
|
||
document.head.appendChild(script); | ||
loadScript(); | ||
}; | ||
|
||
// End: FreshChat load function | ||
|
||
document.addEventListener("DOMContentLoaded", () => { | ||
|
@@ -3662,7 +3715,10 @@ <h3 class="_404-heading">We couldn’t find that page</h3> | |
const allowedCountries = "gh"; | ||
const allowedCountriesEU = "cy"; | ||
|
||
if (allowedCountries.includes(client_country) || allowedCountriesEU.includes(client_country)) { | ||
if ( | ||
allowedCountries.includes(client_country) || | ||
allowedCountriesEU.includes(client_country) | ||
) { | ||
const signupBtn = Array.from(document.querySelectorAll("a")).filter( | ||
(link) => link.href.includes("https://login.deriv.com/signup.php") | ||
); | ||
|
Oops, something went wrong.