added function to distinguish between espn.html and tweet.html

added statement that distinguishes which page is load and which
function to run according to the index of the url.