@@ -19,8 +19,8 @@ document.addEventListener("DOMContentLoaded", () => {
1919 const eventKeyInput = document . getElementById ( "eventKeyInput" ) ;
2020 const linkInput = document . getElementById ( "linkInput" ) ;
2121
22- let eventKey = JSON . parse ( localStorage . getItem ( "eventKey" ) ) || [ "Ctrl" , "E "] ;
23- let eventKeyRaw = localStorage . getItem ( "eventKeyRaw" ) || "Ctrl,E " ;
22+ let eventKey = JSON . parse ( localStorage . getItem ( "eventKey" ) ) || [ "` " ] ;
23+ let eventKeyRaw = localStorage . getItem ( "eventKeyRaw" ) || "` " ;
2424 let pLink = localStorage . getItem ( "pLink" ) || "https://classroom.google.com/" ;
2525
2626 eventKeyInput . value = eventKeyRaw ;
@@ -58,17 +58,20 @@ document.addEventListener("DOMContentLoaded", () => {
5858 document . getElementById ( "ab-settings-switch" ) . checked = true ;
5959 }
6060
61+ const backgroundInput = document . getElementById ( "background-input" ) ;
62+ backgroundInput . value = localStorage . getItem ( "backgroundImage" ) || "" ;
63+
6164 document . getElementById ( "save-button" ) . addEventListener ( "click" , ( ) => {
62- const imageURL = document . getElementById ( "background-input" ) . value . trim ( ) ;
65+ const imageURL = backgroundInput . value . trim ( ) ;
6366 if ( imageURL ) {
6467 localStorage . setItem ( "backgroundImage" , imageURL ) ;
6568 document . body . style . backgroundImage = `url('${ imageURL } ')` ;
66- document . getElementById ( "background-input" ) . value = "" ;
6769 }
6870 } ) ;
6971
7072 document . getElementById ( "reset-button" ) . addEventListener ( "click" , ( ) => {
7173 localStorage . removeItem ( "backgroundImage" ) ;
74+ backgroundInput . value = "" ;
7275 document . body . style . backgroundImage = "" ;
7376 window . location . reload ( ) ;
7477 } ) ;
0 commit comments