47 lines
1.5 KiB
JavaScript
Raw Normal View History

2020-10-10 19:26:30 -06:00
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
$('.item-link[data-setting=apptheme] select').on("change", function () {
setStorage("apptheme", $('.item-link[data-setting=apptheme] select').val());
applyColorTheme();
});
$('.item-link[data-setting=animation] select').on("change", function () {
setStorage("animation", $('.item-link[data-setting=animation] select').val());
if (getStorage("animation") != "auto") {
setAnimations();
}
if (getStorage("animation") == "auto") {
toggleAnimations(auto_disable_animations == false);
}
});
$('.item-link[data-setting=mapsource] select').on("change", function () {
setStorage("mapsource", $('.item-link[data-setting=mapsource] select').val());
reloadMap();
});
$('.item-content[data-setting=hideaccountnag] .toggle input').on("change", function () {
var checked = $(this).prop('checked');
setStorage("hideaccountnag", checked);
});
2022-01-20 00:39:12 -07:00
$('.item-content[data-setting=analytics] .toggle input').on("change", function () {
var checked = $(this).prop('checked');
setStorage("analytics", checked ? "true" : "false");
});
function resetAccountPrompt() {
app.dialog.confirm("Are you sure you want to log out?", function () {
removeFromStorage("accountnumber");
removeFromStorage("accountkey");
restartApplication();
});
}