-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.js
More file actions
27 lines (20 loc) · 758 Bytes
/
options.js
File metadata and controls
27 lines (20 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
DGSOptions.restore()
function save() {
DGSOptions.options.frequency = Number(document.getElementById('check_frequency').value)
DGSOptions.options.hardcoreMode = document.getElementById('hardcore_mode').checked
DGSOptions.save()
DGSOptions.init()
startChecking()
window.close()
}
document.addEventListener('DOMContentLoaded', function() {
document.querySelector('#save_options').addEventListener('click', save);
var freqSelector = document.getElementById('check_frequency')
var options = freqSelector.options
for (var i = 0; i < options.length; i++) {
if (options[i].value == DGSOptions.options.frequency) {
freqSelector.selectedIndex = i;
}
}
document.getElementById('hardcore_mode').checked = DGSOptions.options.hardcoreMode
});