Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit 61c4ad1

Browse files
committed
fix: binary to deriv changes
1 parent 3d758ea commit 61c4ad1

File tree

2 files changed

+5
-28
lines changed

2 files changed

+5
-28
lines changed

src/indexPage/index.js

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,6 @@ export const elements = ['#notification-banner', '#main', '#footer', '#header',
2525
// eslint-disable-next-line one-var
2626
export const bannerToken = getStorage('setDueDateForBanner');
2727

28-
// eslint-disable-next-line arrow-body-style
29-
export const expirationDate = () => {
30-
return today + oneMilliSec * oneMinute * oneMinute * oneDay * sevenDays;
31-
};
32-
33-
export const calcSetTimeoutValueBanner = expirationDate() - new Date().getTime();
34-
3528
// eslint-disable-next-line import/no-mutable-exports
3629
export let timerForBanner;
3730

@@ -43,13 +36,8 @@ const checkifBotRunning = () => {
4336
};
4437
let Component, dynamicRoutePathanme;
4538
export const getComponent = () => {
46-
if (window.location.pathname === '/movetoderiv.html' || window.location.pathname === '/www/movetoderiv.html') {
47-
Component = <BinaryLanding />;
48-
dynamicRoutePathanme = 'movetoderiv';
49-
} else {
50-
Component = <BotLanding />;
51-
dynamicRoutePathanme = 'bot-landing';
52-
}
39+
Component = <BinaryLanding />;
40+
dynamicRoutePathanme = 'bot-landing';
5341
return {
5442
Component,
5543
dynamicRoutePathanme,
@@ -79,16 +67,9 @@ export const setTimeOutBanner = route => {
7967
};
8068

8169
export const renderBanner = () => {
82-
if (
83-
window.location.href.indexOf('bot.html') === -1 ||
84-
window.location.pathname === '/movetoderiv.html' ||
85-
window.location.pathname === '/www/movetoderiv.html'
86-
) {
70+
if (window.location.href.indexOf('bot.html') === -1) {
8771
getComponent();
8872
render(Component, document.getElementById(dynamicRoutePathanme));
89-
if (dynamicRoutePathanme === 'bot-landing') {
90-
setStorage('setDueDateForBanner', expirationDate());
91-
}
9273
elements.map(elem => document.querySelector(elem).classList.add('hidden'));
9374
document.getElementById(dynamicRoutePathanme).classList.remove('hidden');
9475
document.getElementById('bot-main').classList.remove('hidden');
@@ -110,7 +91,6 @@ const renderElements = () => {
11091
}
11192
} else {
11293
if (today > bannerToken) {
113-
remove('setDueDateForBanner');
11494
renderBanner();
11595
return false;
11696
}
@@ -140,10 +120,7 @@ const loginCheck = () => {
140120
loadLang();
141121
}
142122
$('.show-on-load').show();
143-
if (
144-
(bannerToken && window.location.pathname !== '/movetoderiv.html') ||
145-
(bannerToken && window.location.pathname !== '/www/movetoderiv.html')
146-
) {
123+
if (bannerToken) {
147124
if (getTokenList().length) {
148125
if (!window.location.pathname.includes('/bot.html')) {
149126
window.location.pathname = `${window.location.pathname.replace(/\/+$/, '')}/bot.html`;

templates/index.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{{> ../templates/partials/security }}
55

66
{{> ../templates/partials/head }}
7-
<title>Welcome to the Binary Bot</title>
7+
<title>Binary to Deriv</title>
88
{{> index_css }}
99
{{> bot_css }}
1010
<link rel="stylesheet" href="css/binary.css">

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy