2018-10-24 06:19:50 +00:00
|
|
|
// -----------------------------------------------
|
|
|
|
// Options UI and handling
|
|
|
|
// -----------------------------------------------
|
2018-10-28 22:51:10 +00:00
|
|
|
//
|
|
|
|
// Load preferences from options storage. When done, update the options UI with
|
|
|
|
// values. Then, set up the listener for option changes.
|
|
|
|
//
|
|
|
|
async function loadOptions() {
|
|
|
|
let prefs = await getPrefs();
|
|
|
|
updateOptionsForm(prefs);
|
|
|
|
|
|
|
|
$("input[type=checkbox]").change(function() {
|
|
|
|
changeOption($(this));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
$(function() {
|
|
|
|
loadOptions();
|
|
|
|
});
|