@@ -451,13 +451,15 @@ export default class Editor {
451
451
if ( this . editor . getOption ( 'indentWithTabs' ) ) {
452
452
Cookies . set ( 'indent_type' , 'tab' , {
453
453
expires : 365 ,
454
- sameSite : 'Lax'
454
+ sameSite : 'Lax' ,
455
+ secure : window . location . protocol === 'https:'
455
456
} )
456
457
type . text ( 'Tab Size:' )
457
458
} else {
458
459
Cookies . set ( 'indent_type' , 'space' , {
459
460
expires : 365 ,
460
- sameSite : 'Lax'
461
+ sameSite : 'Lax' ,
462
+ secure : window . location . protocol === 'https:'
461
463
} )
462
464
type . text ( 'Spaces:' )
463
465
}
@@ -469,12 +471,14 @@ export default class Editor {
469
471
if ( this . editor . getOption ( 'indentWithTabs' ) ) {
470
472
Cookies . set ( 'tab_size' , unit , {
471
473
expires : 365 ,
472
- sameSite : 'Lax'
474
+ sameSite : 'Lax' ,
475
+ secure : window . location . protocol === 'https:'
473
476
} )
474
477
} else {
475
478
Cookies . set ( 'space_units' , unit , {
476
479
expires : 365 ,
477
- sameSite : 'Lax'
480
+ sameSite : 'Lax' ,
481
+ secure : window . location . protocol === 'https:'
478
482
} )
479
483
}
480
484
widthLabel . text ( unit )
@@ -543,7 +547,8 @@ export default class Editor {
543
547
var keymap = this . editor . getOption ( 'keyMap' )
544
548
Cookies . set ( 'keymap' , keymap , {
545
549
expires : 365 ,
546
- sameSite : 'Lax'
550
+ sameSite : 'Lax' ,
551
+ secure : window . location . protocol === 'https:'
547
552
} )
548
553
label . text ( keymap )
549
554
this . restoreOverrideEditorKeymap ( )
@@ -579,7 +584,8 @@ export default class Editor {
579
584
this . editor . setOption ( 'theme' , theme )
580
585
Cookies . set ( 'theme' , theme , {
581
586
expires : 365 ,
582
- sameSite : 'Lax'
587
+ sameSite : 'Lax' ,
588
+ secure : window . location . protocol === 'https:'
583
589
} )
584
590
this . statusIndicators . find ( '.status-theme li' ) . removeClass ( 'active' )
585
591
this . statusIndicators . find ( `.status-theme li[value="${ theme } "]` ) . addClass ( 'active' )
@@ -682,7 +688,8 @@ export default class Editor {
682
688
683
689
Cookies . set ( 'spellcheck' , false , {
684
690
expires : 365 ,
685
- sameSite : 'Lax'
691
+ sameSite : 'Lax' ,
692
+ secure : window . location . protocol === 'https:'
686
693
} )
687
694
688
695
self . editor . setOption ( 'mode' , defaultEditorMode )
@@ -691,7 +698,8 @@ export default class Editor {
691
698
692
699
Cookies . set ( 'spellcheck' , lang , {
693
700
expires : 365 ,
694
- sameSite : 'Lax'
701
+ sameSite : 'Lax' ,
702
+ secure : window . location . protocol === 'https:'
695
703
} )
696
704
697
705
self . editor . setOption ( 'mode' , 'spell-checker' )
@@ -713,7 +721,8 @@ export default class Editor {
713
721
}
714
722
Cookies . set ( 'linter' , true , {
715
723
expires : 365 ,
716
- sameSite : 'Lax'
724
+ sameSite : 'Lax' ,
725
+ secure : window . location . protocol === 'https:'
717
726
} )
718
727
} else {
719
728
this . editor . setOption ( 'gutters' , gutters . filter ( g => g !== lintGutter ) )
@@ -763,7 +772,8 @@ export default class Editor {
763
772
if ( overrideBrowserKeymap . is ( ':checked' ) ) {
764
773
Cookies . set ( 'preferences-override-browser-keymap' , true , {
765
774
expires : 365 ,
766
- sameSite : 'Lax'
775
+ sameSite : 'Lax' ,
776
+ secure : window . location . protocol === 'https:'
767
777
} )
768
778
this . restoreOverrideEditorKeymap ( )
769
779
} else {
0 commit comments