File tree Expand file tree Collapse file tree 2 files changed +1
-13
lines changed Expand file tree Collapse file tree 2 files changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -72,23 +72,13 @@ export function startObservingColorSchemeHtmlAttribute() {
72
72
73
73
{
74
74
const setColorSchemeCookie = ( colorScheme : ColorScheme ) => {
75
- console . log ( "DEBUG: setColorSchemeCookie" ) ;
76
-
77
75
let newCookie = `${ data_fr_theme } =${ colorScheme } ;path=/;max-age=31536000` ;
78
76
79
77
//We do not set the domain if we are on localhost or an ip
80
78
if ( window . location . hostname . match ( / \. [ a - z A - Z ] { 2 , } $ / ) ) {
81
- console . log ( "DEBUG: Append to newCookie" ) ;
82
-
83
- newCookie += `;domain=${
84
- window . location . hostname . split ( "." ) . length >= 3
85
- ? window . location . hostname . replace ( / ^ [ ^ . ] + \. / , "" )
86
- : window . location . hostname
87
- } `;
79
+ newCookie += `;domain=${ window . location . hostname } ` ;
88
80
}
89
81
90
- console . log ( `DEBUG: set newCookie: ${ newCookie } ` ) ;
91
-
92
82
document . cookie = newCookie ;
93
83
} ;
94
84
Original file line number Diff line number Diff line change @@ -67,8 +67,6 @@ export async function startDsfrReact(params: Params) {
67
67
) ;
68
68
}
69
69
70
- console . log ( "DEBUG: startObservingColorSchemeHtmlAttribute" ) ;
71
-
72
70
startObservingColorSchemeHtmlAttribute ( ) ;
73
71
74
72
( window as any ) . dsfr = { verbose, "mode" : "manual" } ;
You can’t perform that action at this time.
0 commit comments