Skip to content

Instantly share code, notes, and snippets.

@raykendo
Last active August 23, 2016 21:40
Show Gist options
  • Save raykendo/c023f9a989e806af362d7ae6bee625c1 to your computer and use it in GitHub Desktop.
Save raykendo/c023f9a989e806af362d7ae6bee625c1 to your computer and use it in GitHub Desktop.
Saving you some embarrassment on LinkedIn with this console tip

Browser console tips

LinkedIn - People I don't know

Current date: 2016-08-23

I'm one of those people who still holds on to the hope that LinkedIn is a good idea. I check in daily and check all the areas I've been trained to look at on most social media sites.

The thing that annoys me about LinkedIn is the "People you may know" page. That long list of your contacts' third cousins, college buddies, and other total strangers. They've designed the page so that you'll accidentally click on one of those strangers, causing an embarrasing incident.

"I'm not really interested in hiring a life-coach at my company right now. Sorry to get your hopes up."

I wanted to mass-close all those links without repetitively clicking on the hidden close buttons. Digging into the code, I studied the HTML and found the site used jQuery. With that knowledge, I cracked open the browser developer tools and typed out this command in the console.

> $(".bt-close").trigger("click");

To translate that into English, I told jQuery to look for all elements with the class bt-close (the class of the close buttons), and trigger a click event on them. After a few seconds, all the people that I didn't know went away. Those potential embarrassing moments faded away with a simple console command.

That's my browser console tip for the day. Hope you enjoyed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment