@@ -46,19 +46,6 @@ document.addEventListener('DOMContentLoaded', function () {
4646
4747 contestTable . appendChild ( row ) ;
4848 } ) ;
49-
50- // Load switch status from localStorage
51- // const notificationCheckbox = document.getElementById('notificationCheckbox');
52- // const switchStatus = document.getElementById('switchStatus');
53-
54- // const switchState = localStorage.getItem('switchState');
55- // if (switchState === 'on') {
56- // notificationCheckbox.checked = true;
57- // switchStatus.textContent = 'Turned On';
58- // } else {
59- // notificationCheckbox.checked = false;
60- // switchStatus.textContent = 'Turned Off';
61- // }
6249
6350 chrome . storage . local . get ( 'switchState' , function ( result ) {
6451 const switchState = result . switchState ;
@@ -81,16 +68,6 @@ document.addEventListener('DOMContentLoaded', function () {
8168 const notificationCheckbox = document . getElementById ( 'notificationCheckbox' ) ;
8269 const switchStatus = document . getElementById ( 'switchStatus' ) ;
8370
84- // notificationCheckbox.addEventListener('change', () => {
85- // if (notificationCheckbox.checked) {
86- // switchStatus.textContent = 'Turned On';
87- // localStorage.setItem('switchState', 'on');
88- // } else {
89- // switchStatus.textContent = 'Turned Off';
90- // localStorage.setItem('switchState', 'off');
91- // }
92- // });
93-
9471 notificationCheckbox . addEventListener ( 'change' , ( ) => {
9572 const isChecked = notificationCheckbox . checked ;
9673 if ( isChecked ) {
0 commit comments