# wt-security/2.2.2/htdocs/js/line-progress.js

WebTotem Security, version 2.2.2. 18 lines.

- Page: https://pluginprobe.com/plugins/wt-security/2.2.2/code/htdocs/js/line-progress.js
- Raw: https://pluginprobe.com/plugins/wt-security/2.2.2/raw/htdocs/js/line-progress.js
- Modified: 2020-10-06T09:33:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wt-security/2.2.2/code/htdocs/js/line-progress.js#L10-L20`.

```javascript
// Progress bar horizontal in table
const stickProgress = document.querySelector(".wtotem_table__stick-progress");
const percentHorizontal = document.querySelector(".wtotem_table__percent");


const setProgressHorizontal = (percent) => {
    percentHorizontal.textContent = `${percent}%`;
    //1.67 * 100 = 167 это ширина этой горизонтальной линии
    stickProgress.style.width = `${percent * 1.67}px`;
};

document.addEventListener('DOMContentLoaded', function () {
    if(typeof availability_percent !== "undefined"){
        setProgressHorizontal(availability_percent);
    }
});
//-----------------------------------

```
