@@ -25,13 +25,6 @@ export const elements = ['#notification-banner', '#main', '#footer', '#header',
25
25
// eslint-disable-next-line one-var
26
26
export const bannerToken = getStorage ( 'setDueDateForBanner' ) ;
27
27
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
-
35
28
// eslint-disable-next-line import/no-mutable-exports
36
29
export let timerForBanner ;
37
30
@@ -43,13 +36,8 @@ const checkifBotRunning = () => {
43
36
} ;
44
37
let Component , dynamicRoutePathanme ;
45
38
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' ;
53
41
return {
54
42
Component,
55
43
dynamicRoutePathanme,
@@ -79,16 +67,9 @@ export const setTimeOutBanner = route => {
79
67
} ;
80
68
81
69
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 ) {
87
71
getComponent ( ) ;
88
72
render ( Component , document . getElementById ( dynamicRoutePathanme ) ) ;
89
- if ( dynamicRoutePathanme === 'bot-landing' ) {
90
- setStorage ( 'setDueDateForBanner' , expirationDate ( ) ) ;
91
- }
92
73
elements . map ( elem => document . querySelector ( elem ) . classList . add ( 'hidden' ) ) ;
93
74
document . getElementById ( dynamicRoutePathanme ) . classList . remove ( 'hidden' ) ;
94
75
document . getElementById ( 'bot-main' ) . classList . remove ( 'hidden' ) ;
@@ -110,7 +91,6 @@ const renderElements = () => {
110
91
}
111
92
} else {
112
93
if ( today > bannerToken ) {
113
- remove ( 'setDueDateForBanner' ) ;
114
94
renderBanner ( ) ;
115
95
return false ;
116
96
}
@@ -140,10 +120,7 @@ const loginCheck = () => {
140
120
loadLang ( ) ;
141
121
}
142
122
$ ( '.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 ) {
147
124
if ( getTokenList ( ) . length ) {
148
125
if ( ! window . location . pathname . includes ( '/bot.html' ) ) {
149
126
window . location . pathname = `${ window . location . pathname . replace ( / \/ + $ / , '' ) } /bot.html` ;
0 commit comments