Created
February 10, 2018 10:55
-
-
Save faustienf/1a4f4b2bf56ed2275de69fa94464e7db to your computer and use it in GitHub Desktop.
sort anime on http://animeru.tv
This file contains 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
$('#mse2_results .mse2-row').sort(function(a,b) { | |
function getViews(el) { | |
return Number($(el).find('table tr:last td').text().trim().match(/\d+$/ig)[0]) | |
} | |
return getViews(b) - getViews(a); | |
}).appendTo('#mse2_results'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment