Commit | Line | Data |
---|---|---|
1 | !function(t){ | |
2 | t.addEventListener('DOMContentLoaded', function () { | |
3 | var l = t.querySelector('#light-off'); | |
4 | if (l !== null) { | |
5 | l.checked = t.cookie.match(/lightOff=true/) !== null; | |
6 | l.addEventListener('change', function () { | |
7 | t.cookie = 'lightOff=' + JSON.stringify(l.checked) + ';path=/'; | |
8 | }); | |
9 | } | |
10 | }) | |
11 | }(document); |