File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,12 @@ const whenElementAdded = (selector, f) => {
15
15
if ( window . location . pathname . toLowerCase ( ) . includes ( "/projects/" ) )
16
16
whenElementAdded ( `#__primerPortalRoot__` , ( e ) => {
17
17
e . addEventListener ( "DOMNodeInserted" , ( i ) => {
18
- if ( i . target . tagName && i . target . tagName . toLowerCase ( ) == "svg" ) // find svg
19
- for ( const child of i . target . children ) // check svg content
20
- if ( child . getAttribute ( "d" ) == "M11.28 6.78a.75.75 0 00-1.06-1.06L7.25 8.69 5.78 7.22a.75.75 0 00-1.06 1.06l2 2a.75.75 0 001.06 0l3.5-3.5z" ) // checkmark
18
+ let svg ;
19
+ if ( svg = i . target . querySelector ( "figure > span > svg" ) )
20
+ for ( const child of svg . children ) // check svg content
21
+ if ( child . getAttribute ( "d" ) == "M11.28 6.78a.75.75 0 00-1.06-1.06L7.25 8.69 5.78 7.22a.75.75 0 00-1.06 1.06l2 2a.75.75 0 001.06 0l3.5-3.5z" ) // check
21
22
return setTimeout ( ( ) => {
22
- i . target . parentElement . classList . add ( "rissue-closed-bg" ) ; // apply css
23
+ svg . parentElement . classList . add ( "rissue-closed-bg" ) ; // apply css
23
24
} , 100 ) ; // doesn't work unless we delay
24
25
} ) ;
25
26
} ) ;
Original file line number Diff line number Diff line change 4
4
"name" : " GitHub Red Issues" ,
5
5
"author" : " Katsute" ,
6
6
"description" : " Revert closed GitHub issues from purple back to red." ,
7
- "version" : " 3.4 " ,
7
+ "version" : " 3.5 " ,
8
8
"homepage_url" : " https://github.com/KatsuteDev/GitHub-Red-Issues" ,
9
9
"icons" : {
10
10
"16" : " icon16.png" ,
You can’t perform that action at this time.
0 commit comments