diff --git a/src/html/options.html b/src/html/options.html index fe86c05..94500c0 100644 --- a/src/html/options.html +++ b/src/html/options.html @@ -66,8 +66,8 @@

Link Extractor

+ data-bs-title="Reset Regex Flags to Default Value." data-bs-toggle="tooltip" + data-value="ig" data-reset-input="flags"> diff --git a/src/js/options.js b/src/js/options.js index 9dd709a..be7a915 100644 --- a/src/js/options.js +++ b/src/js/options.js @@ -210,13 +210,9 @@ async function resetInput(event) { const target = event.currentTarget console.debug('target:', target) event.preventDefault() - const id = target.dataset.resetInput - console.debug('id:', id) - const value = target.dataset.value - console.debug('value:', value) - const input = document.getElementById(id) + const input = document.getElementById(target.dataset.resetInput) console.debug('input:', input) - input.value = value + input.value = target.dataset.value input.classList.remove('is-invalid') input.focus() const changeEvent = new Event('change')