mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-06 13:55:19 +08:00
fixed warnings in custom-background-filter
This commit is contained in:
parent
48c7835f2b
commit
4f418788c4
1 changed files with 11 additions and 11 deletions
|
@ -1,4 +1,4 @@
|
|||
import Config, * as UpdateConfig from "./config";
|
||||
import * as UpdateConfig from "./config";
|
||||
|
||||
let filters = {
|
||||
blur: {
|
||||
|
@ -23,6 +23,16 @@ let filters = {
|
|||
}
|
||||
}
|
||||
|
||||
export function getCSS(){
|
||||
let ret = "";
|
||||
Object.keys(filters).forEach((filterKey) => {
|
||||
if (filters[filterKey].value != filters[filterKey].default){
|
||||
ret += `${filterKey}(${filters[filterKey].value}${filterKey == "blur" ? "rem" : ""}) `
|
||||
}
|
||||
})
|
||||
return ret;
|
||||
}
|
||||
|
||||
export function apply() {
|
||||
let filterCSS = getCSS();
|
||||
$(".customBackground").css({
|
||||
|
@ -76,16 +86,6 @@ $(".customBackgroundFilter .button").click( (e) => {
|
|||
UpdateConfig.setCustomBackgroundFilter(arr, false);
|
||||
});
|
||||
|
||||
export function getCSS(){
|
||||
let ret = "";
|
||||
Object.keys(filters).forEach((filterKey) => {
|
||||
if (filters[filterKey].value != filters[filterKey].default){
|
||||
ret += `${filterKey}(${filters[filterKey].value}${filterKey == "blur" ? "rem" : ""}) `
|
||||
}
|
||||
})
|
||||
return ret;
|
||||
}
|
||||
|
||||
export function loadConfig(config){
|
||||
filters.blur.value = config[0];
|
||||
filters.brightness.value = config[1];
|
||||
|
|
Loading…
Reference in a new issue