Created
December 14, 2014 15:18
-
-
Save hibiyasleep/b2dab44e9b5c3997a32b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // target: http://zermoth.net/mabinogi/ost | |
| // jquery: required | |
| // setting: none | |
| // output-variable: d | |
| // output-type: object | |
| t='' | |
| tn=0 | |
| d={} | |
| void( | |
| $('h2, .tbOST tr').each(function(i, o){ | |
| $o=$(o) | |
| if(o.tagName == 'H2'){ | |
| t = o.innerText | |
| d[t] = [] | |
| tn += 1 | |
| } else { | |
| var l = { | |
| filename: $o.find('a').text(), | |
| disknumber: tn, | |
| tracknumber: $o.find(':first-child').text(), | |
| title: $o.find(':nth-child(2)').text(), | |
| subtitle: $o.find(':nth-child(4)').text() | |
| } | |
| d[t].push(l) | |
| } | |
| }) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment