diff --git a/content/feedback.js b/content/feedback.js new file mode 100644 index 0000000..76e473c --- /dev/null +++ b/content/feedback.js @@ -0,0 +1,17 @@ +const NUM_FIELDS = 5; + +document.addEventListener('DOMContentLoaded', async () => { + const submitBtn = document.querySelector('#ctl00_mainContent_btSendFeedback'); + + for (let i = 0; i < NUM_FIELDS; i++) { + const checkbox = document.querySelector(`#ctl00_mainContent_reload_ctl0${i}_chkList_0`); + + if (checkbox) { + checkbox.checked = true; + } + } + + if (submitBtn) { + submitBtn.click(); + } +}); diff --git a/manifest.json b/manifest.json index 5a8226f..295dd0c 100644 --- a/manifest.json +++ b/manifest.json @@ -17,6 +17,12 @@ "./utils/storage.js", "./content/google.js" ] + }, { + "matches": [ + "https://fap.fpt.edu.vn/Feedback/*" + ], + "js": ["./content/feedback.js"], + "world": "MAIN" }], "action": { "default_popup": "./popup/popup.html"