mirror of
https://github.com/ThisIsBenny/iOS-Widgets.git
synced 2025-06-07 05:57:41 +00:00
Update VodafoneDE.js
Codeverkleinerung der Unterstützung für die Flat Funktionalität.
This commit is contained in:
parent
66f45b42d4
commit
a060c72486
1 changed files with 1 additions and 6 deletions
|
@ -465,12 +465,7 @@ function getTotalValues(v) {
|
||||||
if (v.unitOfMeasure !== 'MB' || total < 1024) {
|
if (v.unitOfMeasure !== 'MB' || total < 1024) {
|
||||||
return `${remainingOrUsed} ${unitOfMeasure} von ${total} ${unitOfMeasure}`;
|
return `${remainingOrUsed} ${unitOfMeasure} von ${total} ${unitOfMeasure}`;
|
||||||
} else if (total >= 100000000) {
|
} else if (total >= 100000000) {
|
||||||
if (showRemainingContingent) {
|
return showRemainingContingent ? 'Flat' : (v.used <= 1024 ? `${v.used} MB verbraucht` : `${(v.used / 1024).toFixed(2)} GB verbraucht`);
|
||||||
return 'Flat';
|
|
||||||
} else {
|
|
||||||
const usedValue = v.used <= 1024 ? `${v.used} MB` : `${(v.used / 1024).toFixed(2)} GB`;
|
|
||||||
return `${usedValue} verbraucht`;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
const GB = (remainingOrUsed / 1024).toFixed(2);
|
const GB = (remainingOrUsed / 1024).toFixed(2);
|
||||||
const totalGB = (total / 1024).toFixed(2);
|
const totalGB = (total / 1024).toFixed(2);
|
||||||
|
|
Loading…
Add table
Reference in a new issue