usb() fix, users() fix tty (sindows)

This commit is contained in:
Sebastian Hildebrandt 2022-01-21 12:11:59 +01:00
parent 31868a7ddb
commit d8de20420d
5 changed files with 9 additions and 3 deletions

View File

@ -80,6 +80,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment |
| -------------- | -------------- | -------- |
| 5.10.6 | 2022-01-21 | `usb()` fix `users()` fix tty (windows) |
| 5.10.5 | 2022-01-19 | `processes()` fix calculation (windows) |
| 5.10.4 | 2022-01-18 | `battery()` fix detection (windows) |
| 5.10.3 | 2022-01-17 | `system()` improved virtual detection (windows) |

View File

@ -57,6 +57,11 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.10.6</th>
<td>2022-01-21</td>
<td><span class="code">usb()</span> fix, <span class="code">users()</span> fix tty (windows)</td>
</tr>
<tr>
<th scope="row">5.10.5</th>
<td>2022-01-19</td>

View File

@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div>
<div class="version">New Version: <span id="version">5.10.5</span></div>
<div class="version">New Version: <span id="version">5.10.6</span></div>
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
</div>
<div class="down">

View File

@ -263,7 +263,7 @@ function usb(callback) {
});
}
if (_windows) {
util.powerShell('Get-WmiObject CIM_LogicalDevice | where { $_.Description -match "^USB"}').then((stdout, error) => {
util.powerShell('Get-WmiObject CIM_LogicalDevice | where { $_.Description -match "USB"}').then((stdout, error) => {
if (!error) {
const parts = stdout.toString().split(/\n\s*\n/);
for (let i = 0; i < parts.length; i++) {

View File

@ -349,7 +349,7 @@ function fuzzyMatch(name1, name2) {
name2 = name2.toLowerCase();
let eq = 0;
let len = name1.length;
if (name2.length > len) { len = name1.length; }
if (name2.length > len) { len = name2.length; }
for (let i = 0; i < len; i++) {
const c1 = name1[i] || '';