Created
July 17, 2018 15:45
-
-
Save nurv/ef24e1edac85e5b8f8c81bce47001389 to your computer and use it in GitHub Desktop.
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
$(".episodecell").toArray().sort((a,b) => { | |
var arr = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; | |
var date = $(".caption2.singleline", a)[1].innerHTML.replace(/^\s+|\s+$/, "").split("•")[0]; | |
var resa = arr.indexOf(date.substr(0,3))*100 + parseInt(date.substr(4)); | |
var date = $(".caption2.singleline", b)[1].innerHTML.replace(/^\s+|\s+$/, "").split("•")[0]; | |
var resb = arr.indexOf(date.substr(0,3))*100 + parseInt(date.substr(4)); | |
return resa - resb; | |
}).map(X => { | |
$("h2:contains('All Active Episodes')").after(X); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment