Skip to content

Instantly share code, notes, and snippets.

@bernatfortet
Last active August 17, 2017 03:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bernatfortet/3f191befb9caf093cf83dbdc0e488df3 to your computer and use it in GitHub Desktop.
Save bernatfortet/3f191befb9caf093cf83dbdc0e488df3 to your computer and use it in GitHub Desktop.
Reorganize coinMarketCap Top20 by volume and negative change
javascript:(function(){
tbody = $('#currencies_wrapper').find('tbody');
tbody.children()
.each( function(index, item){
if( index >= 20 )
item.remove();
});
tbody.find('tr')
.sort( function( itemA, itemB ){
percentItemA = parseFloat( $(itemA).find('.percent-24h').text() );
percentItemB = parseFloat( $(itemB).find('.percent-24h').text() );
if( percentItemA > percentItemB )
return 1;
else
return -1;
})
.appendTo(tbody);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment