Fix JavaScript that gets links from sites

Job ID: 33746958

Budget: $10 – $11 AUD

My JavaScript code is supposed to return a list of links on a web site when I run the snippet on the Inspect console. It returns a list of sites but I have one problem:

In some cases it duplicates entries (you can try this on YouTube)

I need to remove duplicate entries
Related categories: JavaScript HTML jQuery / Prototype