Jyyjy commented on code in PR #480: URL: https://github.com/apache/flagon-useralejs/pull/480#discussion_r1684864100
########## src/UserALEWebExtension/options.ts: ########## @@ -76,7 +75,46 @@ function getConfig() { (document.getElementById("filter") as HTMLInputElement).value = payload.pluginConfig.urlWhitelist; }); + + (document.getElementById("optionsForm") as HTMLFormElement).addEventListener( + "submit", + setConfig, + ); + (document.getElementById("issueForm") as HTMLFormElement).addEventListener( + "submit", + reportIssue, + ); +} + +function reportIssue() { + browser.runtime.sendMessage({ + type: MessageTypes.ISSUE_REPORT, + payload: { + issueType: ( + document.querySelector( + 'input[name="issueType"]:checked', + ) as HTMLButtonElement + ).value, + issueDescription: ( + document.getElementById("issueDescription") as HTMLTextAreaElement + ).value, + type: "issue", Review Comment: I'll move to details. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@flagon.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@flagon.apache.org For additional commands, e-mail: notifications-h...@flagon.apache.org