@@ -169,6 +169,7 @@ function allIncluded(){
169
169
<br>" + nextWeekUl + "<br><br>\
170
170
<b>3. What is stopping me from doing my work?</b>\
171
171
<p> " + userReason + "</p>" ;
172
+ scrumBody . dispatchEvent ( new Event ( "paste" , { bubbles : true } ) ) ;
172
173
} ) ;
173
174
}
174
175
@@ -202,7 +203,8 @@ function allIncluded(){
202
203
date = "0" + date ;
203
204
var dateCode = year . toString ( ) + month . toString ( ) + date . toString ( ) ;
204
205
scrumSubject . value = "[Scrum] " + name + " - " + project + " - " + dateCode + " - False" ;
205
- } , 2000 ) ;
206
+ scrumSubject . dispatchEvent ( new Event ( "input" , { bubbles : true } ) ) ;
207
+ } ) ;
206
208
}
207
209
208
210
// write PRs Reviewed
@@ -320,44 +322,34 @@ function allIncluded(){
320
322
}
321
323
//check for scrum body loaded
322
324
var intervalBody = setInterval ( function ( ) {
323
- var scrumBody0 = document . getElementById ( "p-b-0" ) ;
324
- var scrumBody1 = document . getElementById ( "p-b-1" ) ;
325
- var scrumBody2 = document . getElementById ( "p-b-2" ) ;
326
- if ( scrumBody0 ) {
327
- clearInterval ( intervalBody ) ;
328
- scrumBody = document . getElementById ( "p-b-0" ) ;
329
- writeScrumBody ( ) ;
330
- }
331
- if ( scrumBody1 ) {
325
+ var bodies = [
326
+ document . getElementById ( "p-b-0" ) ,
327
+ document . getElementById ( "p-b-1" ) ,
328
+ document . getElementById ( "p-b-2" ) ,
329
+ document . querySelector ( "c-wiz [aria-label='Compose a message'][role=textbox]" ) ] ;
330
+ for ( var body of bodies ) {
331
+ if ( ! body )
332
+ continue ;
332
333
clearInterval ( intervalBody ) ;
333
- scrumBody = document . getElementById ( "p-b-1" ) ;
334
- writeScrumBody ( ) ;
335
- }
336
- if ( scrumBody2 ) {
337
- clearInterval ( intervalBody ) ;
338
- scrumBody = document . getElementById ( "p-b-2" ) ;
334
+ scrumBody = body ;
339
335
writeScrumBody ( ) ;
340
336
}
341
337
} , 500 ) ;
342
338
343
339
//check for subject loaded
344
340
var intervalSubject = setInterval ( function ( ) {
345
- var scrumSubject0 = document . getElementById ( "p-s-0" ) ;
346
- var scrumSubject1 = document . getElementById ( "p-s-1" ) ;
347
- var scrumSubject2 = document . getElementById ( "p-s-2" ) ;
348
- if ( scrumSubject0 && githubUserData ) {
349
- clearInterval ( intervalSubject ) ;
350
- scrumSubject = document . getElementById ( "p-s-0" ) ;
351
- scrumSubjectLoaded ( ) ;
352
- }
353
- else if ( scrumSubject1 && githubUserData ) {
354
- clearInterval ( intervalSubject ) ;
355
- scrumSubject = document . getElementById ( "p-s-1" ) ;
356
- scrumSubjectLoaded ( ) ;
357
- }
358
- else if ( scrumSubject2 && githubUserData ) {
341
+ if ( ! githubUserData )
342
+ return ;
343
+ var subjects = [
344
+ document . getElementById ( "p-s-0" ) ,
345
+ document . getElementById ( "p-s-1" ) ,
346
+ document . getElementById ( "p-s-2" ) ,
347
+ document . querySelector ( "c-wiz input[aria-label=Subject]" ) ] ;
348
+ for ( var subject of subjects ) {
349
+ if ( ! subject )
350
+ continue ;
359
351
clearInterval ( intervalSubject ) ;
360
- scrumSubject = document . getElementById ( "p-s-2" ) ;
352
+ scrumSubject = subject ;
361
353
scrumSubjectLoaded ( ) ;
362
354
}
363
355
} , 500 ) ;
@@ -399,4 +391,8 @@ function allIncluded(){
399
391
allIncluded ( ) ;
400
392
}
401
393
}
402
- allIncluded ( ) ;
394
+ allIncluded ( ) ;
395
+
396
+ $ ( "button>span:contains(New conversation)" ) . parent ( "button" ) . click ( function ( ) {
397
+ allIncluded ( ) ;
398
+ } ) ;
0 commit comments