mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-05 21:33:40 +08:00
Fixed theme preview
This commit is contained in:
parent
3b192947e2
commit
bf2c797288
1 changed files with 3 additions and 3 deletions
|
@ -43,11 +43,11 @@ function showFound() {
|
|||
try {
|
||||
$.each(list.list, (index, obj) => {
|
||||
if (obj.found) {
|
||||
obj.hover();
|
||||
if (!/theme/gi.test(obj.id) || obj.id === "toggleCustomTheme")
|
||||
ThemeController.clearPreview();
|
||||
if (!/font/gi.test(obj.id))
|
||||
Config.previewFontFamily(Config.fontFamily);
|
||||
obj.hover();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
@ -362,10 +362,10 @@ $("#commandLineWrapper #commandLine .suggestions").on("mouseover", (e) => {
|
|||
let list = CommandlineLists.current[CommandlineLists.current.length - 1];
|
||||
$.each(list.list, (index, obj) => {
|
||||
if (obj.id == hoverId) {
|
||||
obj.hover();
|
||||
if (!/theme/gi.test(obj.id) || obj.id === "toggleCustomTheme")
|
||||
ThemeController.clearPreview();
|
||||
if (!/font/gi.test(obj.id)) Config.previewFontFamily(Config.fontFamily);
|
||||
obj.hover();
|
||||
}
|
||||
});
|
||||
} catch (e) {}
|
||||
|
@ -483,11 +483,11 @@ $(document).keydown((e) => {
|
|||
CommandlineLists.current[CommandlineLists.current.length - 1];
|
||||
$.each(list.list, (index, obj) => {
|
||||
if (obj.id == hoverId) {
|
||||
obj.hover();
|
||||
if (!/theme/gi.test(obj.id) || obj.id === "toggleCustomTheme")
|
||||
ThemeController.clearPreview();
|
||||
if (!/font/gi.test(obj.id))
|
||||
Config.previewFontFamily(Config.fontFamily);
|
||||
obj.hover();
|
||||
}
|
||||
});
|
||||
} catch (e) {}
|
||||
|
|
Loading…
Reference in a new issue