this is more consistent when the user interacts with the checkbox
This commit is contained in:
		
							parent
							
								
									626920cdb3
								
							
						
					
					
						commit
						3d87374e6c
					
				@ -1835,11 +1835,7 @@ single.getRoute("/webui/cheats").on("beforeload", function () {
 | 
				
			|||||||
                            var x = document.getElementById(`${key}`);
 | 
					                            var x = document.getElementById(`${key}`);
 | 
				
			||||||
                            if (x != null) {
 | 
					                            if (x != null) {
 | 
				
			||||||
                                if (x.type == "checkbox") {
 | 
					                                if (x.type == "checkbox") {
 | 
				
			||||||
                                    if (value === true) {
 | 
					                                    x.checked = value;
 | 
				
			||||||
                                        x.setAttribute("checked", "checked");
 | 
					 | 
				
			||||||
                                    } else {
 | 
					 | 
				
			||||||
                                        x.removeAttribute("checked");
 | 
					 | 
				
			||||||
                                    }
 | 
					 | 
				
			||||||
                                } else if (x.type == "number") {
 | 
					                                } else if (x.type == "number") {
 | 
				
			||||||
                                    x.setAttribute("value", `${value}`);
 | 
					                                    x.setAttribute("value", `${value}`);
 | 
				
			||||||
                                }
 | 
					                                }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user