mirror of
https://github.com/GoogleChrome/chrome-extensions-samples.git
synced 2026-03-27 13:29:34 +07:00
fix: the extension page will refresh after clicking the button. We need to add preventDefault to prevent form default behavior. (#1378)
Co-authored-by: George <minggeorgelei@gmail.com>
This commit is contained in:
@@ -28,7 +28,8 @@ function parseMilliseconds(timeframe) {
|
||||
return null;
|
||||
}
|
||||
|
||||
function buttonClicked() {
|
||||
function buttonClicked(event) {
|
||||
event.preventDefault();
|
||||
const option = document.getElementById('timeframe');
|
||||
let selectedTimeframe = option.value;
|
||||
let removal_start = parseMilliseconds(selectedTimeframe);
|
||||
|
||||
Reference in New Issue
Block a user