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) => {
14
14
} ) ;
15
15
16
16
// 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 ;
18
18
chrome . storage . local . get ( 'fontSize' , function ( data ) {
19
19
if ( data . fontSize ) {
20
20
fontSizeSelect ! . value = data . fontSize ;
21
21
document . documentElement . style . setProperty ( '--dynamic-font-size' , `${ data . fontSize } px` ) ;
22
22
}
23
23
} ) ;
24
24
25
- fontSizeSelect ! . onchange = function ( ) {
26
- let selectedFontSize = this . value ;
25
+ fontSizeSelect . onchange = function ( this : GlobalEventHandlers , ev : Event ) {
26
+ let selectedFontSize = 14 ;
27
27
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
29
28
document . documentElement . style . setProperty ( '--dynamic-font-size' , `${ selectedFontSize } px` ) ;
30
29
} ;
31
30
You can’t perform that action at this time.
0 commit comments