@@ -39,9 +39,9 @@ MuseScore {
3939 }
4040
4141 function blackenElement (element ) {
42- if (element .type == Element .REST )
42+ if (element .type === Element .REST )
4343 element .color = " black"
44- else if (element .type == Element .CHORD ) {
44+ else if (element .type === Element .CHORD ) {
4545 if (element .stem )
4646 element .stem .color = " black"
4747 if (element .hook )
@@ -51,7 +51,7 @@ MuseScore {
5151 if (element .stemSlash )
5252 element .stemSlash .color = " black"
5353 }
54- else if (element .type == Element .NOTE ) {
54+ else if (element .type === Element .NOTE ) {
5555 element .color = " black"
5656 if (element .accidental )
5757 element .accidental .color = " black"
@@ -81,7 +81,7 @@ MuseScore {
8181 else {
8282 startStaff = cursor .staffIdx ;
8383 cursor .rewind (2 )
84- if (cursor .tick == 0 ) {
84+ if (cursor .tick === 0 ) {
8585 // this happens when the selection includes
8686 // the last measure of the score.
8787 // rewind(2) goes behind the last segment (where
@@ -103,21 +103,21 @@ MuseScore {
103103
104104 while (cursor .segment && (fullScore || cursor .tick < endTick)) {
105105 if (cursor .element ) {
106- if (cursor .element .type == Element .REST )
106+ if (cursor .element .type === Element .REST )
107107 func (cursor .element )
108- else if (cursor .element .type == Element .CHORD ) {
108+ else if (cursor .element .type === Element .CHORD ) {
109109 func (cursor .element )
110110 var graceChords = cursor .element .graceNotes ;
111111 for (var i = 0 ; i < graceChords .length ; i++ ) {
112112 // iterate through all grace chords
113113 func (graceChords[i])
114- var notes = graceChords[i].notes
114+ var gnotes = graceChords[i].notes
115115 for (var j = 0 ; j < graceChords[i].notes .length ; j++ )
116- func (graceChords[i].notes [j])
116+ func (graceChords[i].gnotes [j])
117117 }
118118 var notes = cursor .element .notes
119- for (var i = 0 ; i < notes .length ; i ++ ) {
120- var note = notes[i ]
119+ for (var k = 0 ; k < notes .length ; k ++ ) {
120+ var note = notes[k ]
121121 func (note)
122122 }
123123 }
0 commit comments