Skip to content

Commit

Permalink
feat: auto complete feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
DAN3002 committed Oct 17, 2023
1 parent 35ea7cb commit b6c8e05
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
17 changes: 17 additions & 0 deletions content/feedback.js
Original file line number Diff line number Diff line change
@@ -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();
}
});
6 changes: 6 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b6c8e05

Please sign in to comment.