Skip to content

Commit 418a291

Browse files
author
hkedia321
committed
Fix #17 - enable by default
1 parent e8dc8d3 commit 418a291

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

src/popup.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ <h6 class="center">
4343
<div class="col s12"><span>Date should be in YYYY-MM-DD format</span></div>
4444
<div class="col s12">
4545
<br />
46-
<input type="checkbox" class="filled-in" id="showOpenLabel" />
46+
<input type="checkbox" class="filled-in" id="showOpenLabel"/>
4747
<label for="showOpenLabel">Show Open Label</label>
4848
</div>
4949
<div class="col s12">
50-
<input type="checkbox" class="filled-in" id="showClosedLabel" />
50+
<input type="checkbox" class="filled-in" id="showClosedLabel"/>
5151
<label for="showClosedLabel">Show Closed Label</label>
5252
</div>
5353
<div class="input-field col s12">
5454
<input placeholder="Reason" id="userReason" type="text">
55-
<label for="UserReason">What is stopping you from doing your work?</label>
55+
<label for="userReason">What is stopping you from doing your work?</label>
5656
</div>
5757
<div class="col center s12">
5858
<br /><br />

src/scripts/main.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ function handleBodyOnLoad(){
1515
if(items.enableToggle){
1616
enableToggleElement.checked=items.enableToggle;
1717
}
18+
else if(items.enableToggle!==false){// undefined
19+
enableToggleElement.checked=true;
20+
handleEnableChange();
21+
}
1822
if(items.endingDate){
1923
endingDateElement.value = items.endingDate;
2024
}
@@ -24,9 +28,17 @@ function handleBodyOnLoad(){
2428
if(items.showOpenLabel){
2529
showOpenLabelElement.checked= items.showOpenLabel;
2630
}
31+
else if(items.showOpenLabel!==false){// undefined
32+
showOpenLabelElement.checked=true;
33+
handleOpenLabelChange();
34+
}
2735
if(items.showClosedLabel){
2836
showClosedLabelElement.checked= items.showClosedLabel;
2937
}
38+
else if(items.showClosedLabel!==false){
39+
showClosedLabelElement.checked=true;
40+
handleClosedLabelChange();
41+
}
3042
if(items.userReason){
3143
userReasonElement.value = items.userReason;
3244
}

0 commit comments

Comments
 (0)