Skip to content

Commit

Permalink
Fix swicth indentation spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
pakaoraki committed Jul 2, 2024
1 parent 529bf35 commit 79d55c6
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions caffeine@patapon.info/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,24 +195,24 @@ class CaffeineToggle extends QuickSettings.QuickMenuToggle {
let hours = Math.floor(timer / 3600);
let minutes = Math.floor((timer % 3600) / 60);
switch (hours) {
case 0:
break;
case 1:
label = hours + _(' hour ');
break;
default:
label = hours + _(' hours ');
break;
case 0:
break;
case 1:
label = hours + _(' hour ');
break;
default:
label = hours + _(' hours ');
break;
}
switch (minutes) {
case 0:
break;
case 1:
label = label + minutes + _(' minute');
break;
default:
label = label + minutes + _(' minutes');
break;
case 0:
break;
case 1:
label = label + minutes + _(' minute');
break;
default:
label = label + minutes + _(' minutes');
break;
}
}
if (!label) {
Expand Down Expand Up @@ -823,24 +823,24 @@ class Caffeine extends QuickSettings.SystemIndicator {
const min = Math.floor((timerDuration % 3600) / 60);
let timeLabel = '';
switch (hours) {
case 0:
break;
case 1:
timeLabel = hours + _(' hour ');
break;
default:
timeLabel = hours + _(' hours ');
break;
case 0:
break;
case 1:
timeLabel = hours + _(' hour ');
break;
default:
timeLabel = hours + _(' hours ');
break;
}
switch (min) {
case 0:
break;
case 1:
timeLabel += min + _(' minute ');
break;
default:
timeLabel += min + _(' minutes ');
break;
case 0:
break;
case 1:
timeLabel += min + _(' minute ');
break;
default:
timeLabel += min + _(' minutes ');
break;
}
this._caffeineToggle.subtitle = timerDuration !== 0
? timeLabel
Expand Down

0 comments on commit 79d55c6

Please sign in to comment.