Skip to content

Instantly share code, notes, and snippets.

@buley
Created May 5, 2012 17:59
Show Gist options
  • Select an option

  • Save buley/2604392 to your computer and use it in GitHub Desktop.

Select an option

Save buley/2604392 to your computer and use it in GitHub Desktop.
Highlight dupes in Amazon Cloud Player
var dedupe_view = function() {
var z = jQuery( '.titleCell' ), zlen = z.length, curr, last;
for ( var y = 0; y < 2; y += 1 ) {
for ( var x = 0; x < zlen; x += 1 ) {
zitem = z[ x ];
curr = jQuery( zitem ).attr( 'title' );
if ( curr === "" || curr === null || 'undefined' === typeof curr ) continue;
if ( last === curr ) {
jQuery( zitem ).parent().find( '[actiontypes="remove"]' ).click().parent().click().parent().click();
} else {
last = jQuery( zitem ).attr( 'title' );
}
}
}
jQuery( '[allactionname="Delete"]' ).click();
jQuery( '[allactionname="Delete"]' ).click();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment