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() {
7272
7373 {
7474 const setColorSchemeCookie = ( colorScheme : ColorScheme ) => {
75- console . log ( "DEBUG: setColorSchemeCookie" ) ;
76-
7775 let newCookie = `${ data_fr_theme } =${ colorScheme } ;path=/;max-age=31536000` ;
7876
7977 //We do not set the domain if we are on localhost or an ip
8078 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 } ` ;
8880 }
8981
90- console . log ( `DEBUG: set newCookie: ${ newCookie } ` ) ;
91-
9282 document . cookie = newCookie ;
9383 } ;
9484
Original file line number Diff line number Diff line change @@ -67,8 +67,6 @@ export async function startDsfrReact(params: Params) {
6767 ) ;
6868 }
6969
70- console . log ( "DEBUG: startObservingColorSchemeHtmlAttribute" ) ;
71-
7270 startObservingColorSchemeHtmlAttribute ( ) ;
7371
7472 ( window as any ) . dsfr = { verbose, "mode" : "manual" } ;
You can’t perform that action at this time.
0 commit comments