mirror of
				https://github.com/monkeytypegame/monkeytype.git
				synced 2025-10-27 01:06:21 +08:00 
			
		
		
		
	fixed theme preview
This commit is contained in:
		
							parent
							
								
									bf2c797288
								
							
						
					
					
						commit
						a54da8ac01
					
				
					 1 changed files with 7 additions and 6 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); | ||||
|             UpdateConfig.previewFontFamily(Config.fontFamily); | ||||
|           obj.hover(); | ||||
|           return false; | ||||
|         } | ||||
|       }); | ||||
|  | @ -362,10 +362,11 @@ $("#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); | ||||
|         if (!/font/gi.test(obj.id)) | ||||
|           UpdateConfig.previewFontFamily(Config.fontFamily); | ||||
|         obj.hover(); | ||||
|       } | ||||
|     }); | ||||
|   } catch (e) {} | ||||
|  | @ -483,11 +484,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); | ||||
|               UpdateConfig.previewFontFamily(Config.fontFamily); | ||||
|             obj.hover(); | ||||
|           } | ||||
|         }); | ||||
|       } catch (e) {} | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue