| 26 | |
| 27 | // This function is responsible to create the trailing color and setting the fill. |
| 28 | function applyFill(slider) { |
| 29 | const percentage = (100 * (slider.value - slider.min)) / (slider.max - slider.min); |
| 30 | const bg = `linear-gradient(90deg, ${sliderProps.fill} ${percentage}%, ${sliderProps.background} ${percentage + |
| 31 | 0.1}%)`; |
| 32 | slider.style.background = bg; |
| 33 | sliderValue.setAttribute("data-length", slider.value); |
| 34 | } |
| 35 | |
| 36 | // Object of all the function names that we will use to create random letters of password |
| 37 | const randomFunc = { |