Skip to content

Instantly share code, notes, and snippets.

@ronipl
Created August 24, 2019 09:04
Show Gist options
  • Save ronipl/48586b1d4ed043fbc846c0b4aac512ef to your computer and use it in GitHub Desktop.
Save ronipl/48586b1d4ed043fbc846c0b4aac512ef to your computer and use it in GitHub Desktop.
Object which maps any previously seen text to true
var seen = {};
$('a').each(function() {
var txt = $(this).text();
if (seen[txt])
$(this).remove();
else
seen[txt] = true;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment