From a060c724861e7893b851c2c3fb981b5aa750f432 Mon Sep 17 00:00:00 2001 From: Chaos53925 Date: Sat, 23 Sep 2023 21:39:22 +0200 Subject: [PATCH] Update VodafoneDE.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Codeverkleinerung der Unterstützung für die Flat Funktionalität. --- VodafoneDE/VodafoneDE.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/VodafoneDE/VodafoneDE.js b/VodafoneDE/VodafoneDE.js index 868464b..02cc35e 100644 --- a/VodafoneDE/VodafoneDE.js +++ b/VodafoneDE/VodafoneDE.js @@ -465,12 +465,7 @@ function getTotalValues(v) { if (v.unitOfMeasure !== 'MB' || total < 1024) { return `${remainingOrUsed} ${unitOfMeasure} von ${total} ${unitOfMeasure}`; } else if (total >= 100000000) { - if (showRemainingContingent) { - return 'Flat'; - } else { - const usedValue = v.used <= 1024 ? `${v.used} MB` : `${(v.used / 1024).toFixed(2)} GB`; - return `${usedValue} verbraucht`; - } + return showRemainingContingent ? 'Flat' : (v.used <= 1024 ? `${v.used} MB verbraucht` : `${(v.used / 1024).toFixed(2)} GB verbraucht`); } else { const GB = (remainingOrUsed / 1024).toFixed(2); const totalGB = (total / 1024).toFixed(2);