switched from using addEventListener to using $().on()
updated the display of the page's location.origin to fallback to location.protocol + location.host