14 lines
437 B
JavaScript
14 lines
437 B
JavaScript
import { restoreOptions, saveOptions, updateBrowserAction } from "./common.js";
|
|
|
|
function listener(el) {
|
|
el.addEventListener("change", () => {
|
|
saveOptions();
|
|
updateBrowserAction();
|
|
});
|
|
}
|
|
|
|
document.addEventListener("DOMContentLoaded", restoreOptions);
|
|
|
|
Array.prototype.forEach.call(document.getElementsByTagName("input"), listener);
|
|
Array.prototype.forEach.call(document.getElementsByTagName("select"), listener);
|