mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-09-06 06:37:35 +08:00
reordered functions to avoid lint errors
This commit is contained in:
parent
3fc5477098
commit
9ffb6c92a6
1 changed files with 24 additions and 24 deletions
|
@ -52,6 +52,30 @@ function syncSliders() {
|
|||
);
|
||||
}
|
||||
|
||||
function updateNumbers() {
|
||||
$(".section.customBackgroundFilter .blur .value").html(
|
||||
parseFloat(filters.blur.value).toFixed(1)
|
||||
);
|
||||
$(".section.customBackgroundFilter .brightness .value").html(
|
||||
parseFloat(filters.brightness.value).toFixed(1)
|
||||
);
|
||||
$(".section.customBackgroundFilter .saturate .value").html(
|
||||
parseFloat(filters.saturate.value).toFixed(1)
|
||||
);
|
||||
$(".section.customBackgroundFilter .opacity .value").html(
|
||||
parseFloat(filters.opacity.value).toFixed(1)
|
||||
);
|
||||
}
|
||||
|
||||
export function loadConfig(config) {
|
||||
filters.blur.value = config[0];
|
||||
filters.brightness.value = config[1];
|
||||
filters.saturate.value = config[2];
|
||||
filters.opacity.value = config[3];
|
||||
updateNumbers();
|
||||
syncSliders();
|
||||
}
|
||||
|
||||
$(".section.customBackgroundFilter .blur input").on("input", (e) => {
|
||||
filters["blur"].value = $(
|
||||
".section.customBackgroundFilter .blur input"
|
||||
|
@ -92,27 +116,3 @@ $(".section.customBackgroundFilter .save.button").click((e) => {
|
|||
UpdateConfig.setCustomBackgroundFilter(arr, false);
|
||||
Notifications.add("Custom background filters saved", 1);
|
||||
});
|
||||
|
||||
export function loadConfig(config) {
|
||||
filters.blur.value = config[0];
|
||||
filters.brightness.value = config[1];
|
||||
filters.saturate.value = config[2];
|
||||
filters.opacity.value = config[3];
|
||||
updateNumbers();
|
||||
syncSliders();
|
||||
}
|
||||
|
||||
function updateNumbers() {
|
||||
$(".section.customBackgroundFilter .blur .value").html(
|
||||
parseFloat(filters.blur.value).toFixed(1)
|
||||
);
|
||||
$(".section.customBackgroundFilter .brightness .value").html(
|
||||
parseFloat(filters.brightness.value).toFixed(1)
|
||||
);
|
||||
$(".section.customBackgroundFilter .saturate .value").html(
|
||||
parseFloat(filters.saturate.value).toFixed(1)
|
||||
);
|
||||
$(".section.customBackgroundFilter .opacity .value").html(
|
||||
parseFloat(filters.opacity.value).toFixed(1)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue