@@ -102,28 +102,30 @@ function fetchGithubData(){
102
102
function writeScrumBody ( ) {
103
103
if ( ! enableToggle )
104
104
return ;
105
- var lastWeekUl = "<ul>" ;
106
- var i ;
107
- for ( i = 0 ; i < lastWeekArray . length ; i ++ )
108
- lastWeekUl += lastWeekArray [ i ] ;
109
- for ( i = 0 ; i < reviewedPrsArray . length ; i ++ )
110
- lastWeekUl += reviewedPrsArray [ i ] ;
111
- lastWeekUl += "</ul>" ;
105
+ setTimeout ( function ( ) { //to apply this after google has autofilled
106
+ var lastWeekUl = "<ul>" ;
107
+ var i ;
108
+ for ( i = 0 ; i < lastWeekArray . length ; i ++ )
109
+ lastWeekUl += lastWeekArray [ i ] ;
110
+ for ( i = 0 ; i < reviewedPrsArray . length ; i ++ )
111
+ lastWeekUl += reviewedPrsArray [ i ] ;
112
+ lastWeekUl += "</ul>" ;
112
113
113
- var nextWeekUl = "<ul>" ;
114
- for ( i = 0 ; i < nextWeekArray . length ; i ++ )
115
- nextWeekUl += nextWeekArray [ i ] ;
116
- for ( i in githubPrsReviewDataProccessed ) {
117
- nextWeekUl += "<li><i>(" + i + ")</i> - Review more PRs </li>" ;
118
- }
119
- nextWeekUl += "</ul>" ;
114
+ var nextWeekUl = "<ul>" ;
115
+ for ( i = 0 ; i < nextWeekArray . length ; i ++ )
116
+ nextWeekUl += nextWeekArray [ i ] ;
117
+ for ( i in githubPrsReviewDataProccessed ) {
118
+ nextWeekUl += "<li><i>(" + i + ")</i> - Review more PRs </li>" ;
119
+ }
120
+ nextWeekUl += "</ul>" ;
120
121
121
- scrumBody . innerHTML = "<b>1. What did I do last week?</b>\
122
- <br>"+ lastWeekUl + "<br><br>\
122
+ scrumBody . innerHTML = "<b>1. What did I do last week?</b>\
123
+ <br>"+ lastWeekUl + "<br><br>\
123
124
<b>2. What I plan to do this week?</b>\
124
125
<br>" + nextWeekUl + "<br><br>\
125
126
<b>3. What is stopping me from doing my work?</b>\
126
127
<p> " + userReason + "</p>" ;
128
+ } , 2000 ) ;
127
129
}
128
130
129
131
function getProject ( ) {
@@ -137,19 +139,21 @@ function getProject(){
137
139
//load initial scrum subject
138
140
function scrumSubjectLoaded ( ) {
139
141
if ( ! enableToggle ) return ;
140
- var name = githubUserData . name || githubUsername ;
141
- var project = getProject ( ) ;
142
- var curDate = new Date ( ) ;
143
- var year = curDate . getFullYear ( ) . toString ( ) ;
144
- var date = curDate . getUTCDate ( ) ;
145
- var month = curDate . getMonth ( ) ;
146
- month ++ ;
147
- if ( month < 10 )
148
- month = "0" + month ;
149
- if ( date < 10 )
150
- date = "0" + date ;
151
- var dateCode = year . toString ( ) + month . toString ( ) + date . toString ( ) ;
152
- scrumSubject . value = "[Scrum] " + name + " - " + project + " - " + dateCode + " - False" ;
142
+ setTimeout ( function ( ) { //to apply this after google has autofilled
143
+ var name = githubUserData . name || githubUsername ;
144
+ var project = getProject ( ) ;
145
+ var curDate = new Date ( ) ;
146
+ var year = curDate . getFullYear ( ) . toString ( ) ;
147
+ var date = curDate . getUTCDate ( ) ;
148
+ var month = curDate . getMonth ( ) ;
149
+ month ++ ;
150
+ if ( month < 10 )
151
+ month = "0" + month ;
152
+ if ( date < 10 )
153
+ date = "0" + date ;
154
+ var dateCode = year . toString ( ) + month . toString ( ) + date . toString ( ) ;
155
+ scrumSubject . value = "[Scrum] " + name + " - " + project + " - " + dateCode + " - False" ;
156
+ } , 2000 ) ;
153
157
}
154
158
155
159
// write PRs Reviewed
0 commit comments