Created
August 24, 2019 09:04
-
-
Save ronipl/48586b1d4ed043fbc846c0b4aac512ef to your computer and use it in GitHub Desktop.
Object which maps any previously seen text to true
This file contains hidden or 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
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