Skip to content
Browse files

Do not treat dominant chords as minors.

  • Loading branch information...
1 parent a3ec708 commit d62c58f0b3f5a63dff560c90c33d209646f240ed Eric Blossom committed Jan 9, 2012
Showing with 3 additions and 2 deletions.
  1. +1 −0 README
  2. +2 −2 Transposer.js
View
1 README
@@ -4,6 +4,7 @@ Use this jQuery plugin to transpose chords in a song in your HTML pages.
- Transpose.js contains the plugin.
- PollyWollyDoodle.html contains an example of using it.
+- package.json for plugins.jQuery.com
Eric Blossom January 2012
http://BlossomAssociates.net/Music/Songbook/
View
4 Transposer.js
@@ -34,10 +34,10 @@
x += chordLetters.length;
}
x %= chordLetters.length;
- if (-1 < h.indexOf('m') && !h.match('maj')) {
+ if (-1 < h.indexOf('m') && !h.match('maj|dom')) { // then it's a minor (or diminished) chord.
this.innerHTML = h.replace(m[0], minorChords[x]);
}
- else {
+ else { // it's a major chord.
this.innerHTML = h.replace(m[0], chords[x]);
}
}

0 comments on commit d62c58f

Please sign in to comment.
Something went wrong with that request. Please try again.