File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -14,18 +14,17 @@ document.addEventListener('DOMContentLoaded', (event) => {
1414} ) ;
1515
1616// Get font fize and check if it is already set in local storage
17- let fontSizeSelect = document . getElementById ( 'font-size-select' ) ;
17+ let fontSizeSelect = document . getElementById ( 'font-size-select' ) as HTMLSelectElement ;
1818chrome . storage . local . get ( 'fontSize' , function ( data ) {
1919 if ( data . fontSize ) {
2020 fontSizeSelect ! . value = data . fontSize ;
2121 document . documentElement . style . setProperty ( '--dynamic-font-size' , `${ data . fontSize } px` ) ;
2222 }
2323} ) ;
2424
25- fontSizeSelect ! . onchange = function ( ) {
26- let selectedFontSize = this . value ;
25+ fontSizeSelect . onchange = function ( this : GlobalEventHandlers , ev : Event ) {
26+ let selectedFontSize = 14 ;
2727 chrome . storage . local . set ( { fontSize : selectedFontSize } ) ;
28- // Add this line to set the font size in your CSS variables every time the font size is changed
2928 document . documentElement . style . setProperty ( '--dynamic-font-size' , `${ selectedFontSize } px` ) ;
3029} ;
3130
You can’t perform that action at this time.
0 commit comments