@@ -27,23 +27,23 @@ $(document).ready(function(){
2727
2828 $ ( '#text' ) . val ( Cookies . get ( "markdownText" ) ) ;
2929
30- let textColor = Cookies . get ( "textColor" ) ;
30+ let textColor = Cookies . get ( "textColor" ) ?? '#374151' ;
3131 $ ( '#textColor' ) . val ( textColor ) ;
3232 root . style . setProperty ( '--textColor' , textColor ) ;
3333
34- let highlightColor = Cookies . get ( "highlightColor" ) ;
34+ let highlightColor = Cookies . get ( "highlightColor" ) ?? '#559949' ;
3535 $ ( '#highlightColor' ) . val ( highlightColor ) ;
3636 root . style . setProperty ( '--highlightColor' , highlightColor ) ;
3737
38- let backgroundColor = Cookies . get ( "backgroundColor" ) ;
38+ let backgroundColor = Cookies . get ( "backgroundColor" ) ?? '#FFFFFF' ;
3939 $ ( '#backgroundColor' ) . val ( backgroundColor ) ;
4040 root . style . setProperty ( '--backgroundColor' , backgroundColor ) ;
4141
42- let titleMargin = Cookies . get ( "titleMargin" ) ;
42+ let titleMargin = Cookies . get ( "titleMargin" ) ?? '4' ;
4343 $ ( '#titleMargin' ) . val ( titleMargin ) ;
4444 root . style . setProperty ( '--titleMargin' , titleMargin + 'px' ) ;
4545
46- let marginHeight = Cookies . get ( "marginHeight" ) ;
46+ let marginHeight = Cookies . get ( "marginHeight" ) ?? '4' ;
4747 $ ( '#marginHeight' ) . val ( marginHeight ) ;
4848 root . style . setProperty ( '--marginHeight' , marginHeight + 'px' ) ;
4949
@@ -97,6 +97,7 @@ $(document).ready(function(){
9797 tempTextarea . remove ( ) ;
9898 } ) ;
9999
100+
100101 let insertTextInTextarea = function ( newText ) {
101102 event . preventDefault ( ) ;
102103 let textarea = $ ( '#text' ) ;
0 commit comments