From fb6885258f8d231b2d3e0006e407aed281842b82 Mon Sep 17 00:00:00 2001 From: Nick Krichevsky Date: Fri, 27 Feb 2015 15:10:27 -0500 Subject: [PATCH] Add saving options --- options.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/options.js b/options.js index d7d0b21..f45f497 100644 --- a/options.js +++ b/options.js @@ -18,6 +18,10 @@ function setupOptionsView(optionsDiv){ var children = Array.prototype.slice.call(optionsDiv.querySelectorAll('input.option')); children.forEach(function(child){ child.checked = options[child.id]; + child.addEventListener('change', function(event){ + options[event.target.id] = event.target.checked; + saveOptions(); + }); }); }