* Update README.MD
* link to russian read me
* change to a language dir
add links for a language directory
* add local version of russian to language label
Early Return: Instead of wrapping the adjustBrushSize call in an if statement, we can return early if the condition is not met. This reduces the level of indentation and makes the code more readable.
Implicit Return: In arrow functions, if the function body consists of a single statement, you can omit the braces and the return keyword. This makes the code more concise. However, in this case, we need to explicitly return false to prevent the default action.
Nullish Coalescing Operator (??): This operator returns the first argument if it's not null or undefined. Otherwise, it returns the second argument. In this case, if tabs is null or undefined, it will return an empty array to prevent errors when calling Array.from.
Destructuring assignment: I've used destructuring assignment to extract properties from objects. It's more concise and easier to read than accessing each property individually.
Combined conditions: I've combined the first two conditions into one if statement, as they both result in the same action (resetZoom()). This reduces redundancy and makes the code more concise.
Variable for repeated condition: I've created a variable isParentSmaller for the repeated condition parentElement.offsetWidth < targetElement.offsetWidth. This makes the code more readable and avoids unnecessary repeated calculations.
Early return: I've replaced break with return in the for loops. This is because break only exits the current iteration of the loop, not the entire function. If el is falsy, we want to exit the entire function, not just the current iteration.
Removed commented code: I've removed the commented code at the top. It's generally a good practice to remove unused code to keep the codebase clean and readable. If this code is needed in the future, it can be retrieved from version control history.
Used optional chaining (?.) to simplify the check if img exists and its display style is not "none". This avoids the need for an explicit check if img is truthy.
Created a helper function createButton to avoid code duplication when creating the buttons.
Used template literals to simplify the creation of the button's className and innerHTML.
Used destructuring in the map and filter callbacks to simplify the access to properties.
Removed the redundant return keyword in the map callback by using implicit return.
Used the spread operator (...) to simplify the assignment of rangeWidth, rangeHeight, inputWidth, and inputHeight.
Used array destructuring to simplify the assignment of rangeWidth.value, inputWidth.value, rangeHeight.value, and inputHeight.value.
Converted the for...of loop to a forEach loop for better readability.
Used optional chaining (?.) to simplify the addition of event listeners to sendToInpainBtn and sendToInpainBtnT2I. This avoids the need for separate if statements.
Used the logical OR operator (||) to simplify the assignment of sendToInpainBtn and sendToInpainBtnT2I. This avoids the need for a separate else block.
Used optional chaining (?.) to simplify the setting of the display style. This avoids the need for an explicit check if img is truthy before setting its style.
Used Boolean() to convert the result of document.querySelector() to a boolean.
Removed the commented out console.log statement.
Used the logical OR operator (||) to simplify the assignment of brush_color and sketch_brush_color in localStorage. This avoids the need for separate if statements.