Randomly auto click on link with javascript

Are it is possible to make a javascript to auto click on randomly link if visitor come from a
specific website or website any page like gooogle.com or google.com/search _result or any blog.com or blog.com/anypage