Created
April 21, 2016 16:09
-
-
Save codenamezjames/8744257f8e558f2b68f97e95c4834632 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
arr = []; | |
$('.forum_header_noborder tr').each(function(){ | |
var title = $(this).find('.epinfo').text(); | |
var link = $(this).find('.magnet').attr('href') | |
arr.push({title:title,link:link}) | |
}) | |
arr.forEach(function(ar){ | |
var match = ar.title.match(/S0\dE\d\d/) | |
ar.title = match ? match[0] : ar.title | |
}) | |
arr = arr.reduce(function(o, n, og){ | |
o[n.title] = n; | |
return o | |
},{}) | |
Object.keys(arr).sort().forEach(function(key) { | |
var value = arr[key]; | |
delete arr[key]; | |
arr[key] = value; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment