Use window.location.origin for sharing url.