Обновление всех файлов с ESLint

This commit is contained in:
2024-03-21 17:17:38 +04:00
parent 85ebad491a
commit 3c3055eb1f
25 changed files with 1649 additions and 648 deletions
+17 -12
View File
@@ -1,6 +1,5 @@
import { Joke, JokeSettings, StopableJoke } from "../joke";
import $ from "jquery";
import { JokerClass } from "../joker";
import {Joke, JokeSettings} from '../joke';
import $ from 'jquery';
/**
* **Карнавал**
@@ -10,14 +9,17 @@ import { JokerClass } from "../joker";
* @author Kozhilya
*/
export class CarnivalJoke extends Joke<CarnivalJokeSettings> {
id = "carnival";
id = 'carnival';
title = "Карнавал";
title = 'Карнавал';
description = "Аватарки приобретают интересные цвета";
description = 'Аватарки приобретают интересные цвета';
_settings = new CarnivalJokeSettings();
/**
* Запуск шутки
*/
start(): void {
$(this.settings.selector).each((_, elem) => {
const filters: string[] = [];
@@ -29,19 +31,22 @@ export class CarnivalJoke extends Joke<CarnivalJokeSettings> {
filters.push(
entry[0].replace(
"{0}",
'{0}',
Math.round(Math.random() * entry[1]).toString()
)
);
}
if (filters.length > 0) {
$(elem).css({ filter: filters.join(" ") });
$(elem).css({filter: filters.join(' ')});
}
});
}
}
/**
* Класс настроек для шутки "Карнавал"
*/
export class CarnivalJokeSettings implements JokeSettings {
enabled: boolean = true;
@@ -61,10 +66,10 @@ export class CarnivalJokeSettings implements JokeSettings {
* Список фильтров и диапозона случайных параметров
*/
variants: CarnivalJokeFilters = {
"sepia({0}%)": 100,
"saturate({0}%)": 100,
"hue-rotate({0}deg)": 360,
"invert({0}%)": 100,
'sepia({0}%)': 100,
'saturate({0}%)': 100,
'hue-rotate({0}deg)': 360,
'invert({0}%)': 100,
};
}