File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -14,24 +14,26 @@ function getCode() {
14
14
let textArray = [ ]
15
15
16
16
// Add the test cases & examples
17
- textArray . push ( '\nHeres the description, examples, and constraints for the problem\n' ) ;
18
17
const examples = document . getElementsByClassName ( 'xFUwe' ) [ 0 ] ;
19
18
if ( examples && examples . children ) {
19
+ textArray . push ( '\nHeres the description, examples, and constraints for the problem\n' ) ;
20
20
for ( const child of examples . children ) {
21
21
let text = child . textContent ;
22
22
if ( text ) textArray . push ( text ) ;
23
23
}
24
24
}
25
25
26
26
// Get the function definition and users code from the code editor
27
- textArray = [ "heres the function definition and the users code which might be not present or might be incorrect.\n" ]
28
27
const codeEditor = document . getElementsByClassName ( 'view-line' ) ;
29
- for ( const viewLine of codeEditor ) {
30
- let text = viewLine . textContent ;
31
- if ( text ) textArray . push ( text ) ;
28
+ if ( codeEditor ) {
29
+ textArray . push ( "heres the function definition and the users code which might be not present or might be incorrect.\n" ) ;
30
+ for ( const viewLine of codeEditor ) {
31
+ let text = viewLine . textContent ;
32
+ if ( text ) textArray . push ( text ) ;
33
+ }
32
34
}
33
- console . log ( 'text array' , textArray ) ;
34
35
36
+ console . log ( 'heres the text array' , textArray ) ;
35
37
return textArray ;
36
38
}
37
39
Original file line number Diff line number Diff line change @@ -35,9 +35,16 @@ <h2 class="title">Settings</h2>
35
35
< span id ="show-rating-icon "> </ span > Show Rating
36
36
</ button >
37
37
< div id ="review ">
38
+ Leave us a
38
39
< a target ="_blank "
39
40
href ="https://chrome.google.com/webstore/detail/leetcode-explained/cofoinjfjcpgcjiinjhcpomcjoalijbe ">
40
- Leave us a review
41
+ review
42
+ </ a >
43
+ </ div >
44
+ < div id ="review ">
45
+ View the
46
+ < a target ="_blank " href ="https://github.com/zubyj/leetcode-explained ">
47
+ source code
41
48
</ a >
42
49
</ div >
43
50
</ body >
You can’t perform that action at this time.
0 commit comments