@@ -415,13 +415,15 @@ export default class Editor {
415
415
if ( this . editor . getOption ( 'indentWithTabs' ) ) {
416
416
Cookies . set ( 'indent_type' , 'tab' , {
417
417
expires : 365 ,
418
- sameSite : 'Lax'
418
+ sameSite : 'Lax' ,
419
+ secure : window . location . protocol === 'https:'
419
420
} )
420
421
type . text ( 'Tab Size:' )
421
422
} else {
422
423
Cookies . set ( 'indent_type' , 'space' , {
423
424
expires : 365 ,
424
- sameSite : 'Lax'
425
+ sameSite : 'Lax' ,
426
+ secure : window . location . protocol === 'https:'
425
427
} )
426
428
type . text ( 'Spaces:' )
427
429
}
@@ -433,12 +435,14 @@ export default class Editor {
433
435
if ( this . editor . getOption ( 'indentWithTabs' ) ) {
434
436
Cookies . set ( 'tab_size' , unit , {
435
437
expires : 365 ,
436
- sameSite : 'Lax'
438
+ sameSite : 'Lax' ,
439
+ secure : window . location . protocol === 'https:'
437
440
} )
438
441
} else {
439
442
Cookies . set ( 'space_units' , unit , {
440
443
expires : 365 ,
441
- sameSite : 'Lax'
444
+ sameSite : 'Lax' ,
445
+ secure : window . location . protocol === 'https:'
442
446
} )
443
447
}
444
448
widthLabel . text ( unit )
@@ -507,7 +511,8 @@ export default class Editor {
507
511
var keymap = this . editor . getOption ( 'keyMap' )
508
512
Cookies . set ( 'keymap' , keymap , {
509
513
expires : 365 ,
510
- sameSite : 'Lax'
514
+ sameSite : 'Lax' ,
515
+ secure : window . location . protocol === 'https:'
511
516
} )
512
517
label . text ( keymap )
513
518
this . restoreOverrideEditorKeymap ( )
@@ -543,7 +548,8 @@ export default class Editor {
543
548
this . editor . setOption ( 'theme' , theme )
544
549
Cookies . set ( 'theme' , theme , {
545
550
expires : 365 ,
546
- sameSite : 'Lax'
551
+ sameSite : 'Lax' ,
552
+ secure : window . location . protocol === 'https:'
547
553
} )
548
554
this . statusIndicators . find ( '.status-theme li' ) . removeClass ( 'active' )
549
555
this . statusIndicators . find ( `.status-theme li[value="${ theme } "]` ) . addClass ( 'active' )
@@ -646,7 +652,8 @@ export default class Editor {
646
652
647
653
Cookies . set ( 'spellcheck' , false , {
648
654
expires : 365 ,
649
- sameSite : 'Lax'
655
+ sameSite : 'Lax' ,
656
+ secure : window . location . protocol === 'https:'
650
657
} )
651
658
652
659
self . editor . setOption ( 'mode' , defaultEditorMode )
@@ -655,7 +662,8 @@ export default class Editor {
655
662
656
663
Cookies . set ( 'spellcheck' , lang , {
657
664
expires : 365 ,
658
- sameSite : 'Lax'
665
+ sameSite : 'Lax' ,
666
+ secure : window . location . protocol === 'https:'
659
667
} )
660
668
661
669
self . editor . setOption ( 'mode' , 'spell-checker' )
@@ -677,7 +685,8 @@ export default class Editor {
677
685
}
678
686
Cookies . set ( 'linter' , true , {
679
687
expires : 365 ,
680
- sameSite : 'Lax'
688
+ sameSite : 'Lax' ,
689
+ secure : window . location . protocol === 'https:'
681
690
} )
682
691
} else {
683
692
this . editor . setOption ( 'gutters' , gutters . filter ( g => g !== lintGutter ) )
@@ -727,7 +736,8 @@ export default class Editor {
727
736
if ( overrideBrowserKeymap . is ( ':checked' ) ) {
728
737
Cookies . set ( 'preferences-override-browser-keymap' , true , {
729
738
expires : 365 ,
730
- sameSite : 'Lax'
739
+ sameSite : 'Lax' ,
740
+ secure : window . location . protocol === 'https:'
731
741
} )
732
742
this . restoreOverrideEditorKeymap ( )
733
743
} else {
0 commit comments