made a visit and viewed function for links when clicked, that opens in new tab and marks as viewed