Javascript is so cool, you can automate anything.

In this example i will show you how to like a picture on Instagram with just 2 lines of javascript code.

var like = document.getElementsByClassName("_eszkz _l9yih");

With javascript you can acces the HTML DOM (Document Object Model).

Finding the like element by the Class Name (press F12 in Chrome)

You can also find elements by :

Method Description
document.getElementById(id) Find an element by element id
document.getElementsByTagName(name) Find elements by tag name
document.getElementsByClassName(name) Find elements by class name