Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
0ry0n authored May 2, 2019
1 parent f6012c2 commit d94771b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ Might require a Gnome restart. Press `ALT+F2` and type `r` and hit enter.
Use the GitHub [Issues](https://github.com/Ory0n/Resource_Monitor/issues) tracker to report issues or ask for features.

# Change Log
**version 4 (May 2, 2019)**
- Network Bugs fixed.

**version 3 (Apr 1, 2019)**
- Bugs fixed.
- Approved on Gnome Extensions.
Expand Down
18 changes: 9 additions & 9 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,11 @@ function refreshEth() {

for (let i = 0; i < line.length; i++)
{
if (line[i].match(/^\s*eth+[0-9]:/))
if (line[i].match(/^\s*(eth+[0-9]|en[a-z0-9]*):/))
{
let values = line[i].match(/^\s*eth+[0-9]:\s+([0-9]+)\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+([0-9]+)/);
dTot += parseInt(values[1]);
uTot += parseInt(values[2]);
let values = line[i].match(/^\s*(eth[0-9]+|en[a-z0-9]*):\s+([0-9]+)\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+([0-9]+)/);
dTot += parseInt(values[2]);
uTot += parseInt(values[3]);
}
}

Expand Down Expand Up @@ -337,7 +337,7 @@ function refreshEth() {
} else {
ethUnit.set_text('B');
}

eth.set_text(down.toFixed(1) + '|' + up.toFixed(1));
}

Expand All @@ -350,11 +350,11 @@ function refreshWlan() {

for (let i = 0; i < line.length; i++)
{
if (line[i].match(/^\s*wlan+[0-9]:/))
if (line[i].match(/^\s*(wlan[0-9]+|wl[a-z0-9]*):/))
{
let values = line[i].match(/^\s*wlan+[0-9]:\s+([0-9]+)\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+([0-9]+)/);
dTot += parseInt(values[1]);
uTot += parseInt(values[2]);
let values = line[i].match(/^\s*(wlan[0-9]+|wl[a-z0-9]*):\s+([0-9]+)\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+([0-9]+)/);
dTot += parseInt(values[2]);
uTot += parseInt(values[3]);
}
}

Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
],
"url": "https://github.com/Ory0n/Resource_Monitor/",
"uuid": "Resource_Monitor@Ory0n",
"version": 4
"version": 5
}

0 comments on commit d94771b

Please sign in to comment.