Fixes #1543 - window.location.origin not always defined, appears to be browser+scenario dependent.
Fixes #1543 - window.location.origin not always defined, appears to be browser+scenario dependent.

ScottShingler/NuGetGallery,JetBrains/ReSharperGallery,grenade/NuGetGallery_download-count-patch,JetBrains/ReSharperGallery,mtian/SiteExtensionGallery,ScottShingler/NuGetGallery,projectkudu/SiteExtensionGallery,skbkontur/NuGetGallery,projectkudu/SiteExtensionGallery,skbkontur/NuGetGallery,mtian/SiteExtensionGallery,JetBrains/ReSharperGallery,mtian/SiteExtensionGallery,ScottShingler/NuGetGallery,projectkudu/SiteExtensionGallery,grenade/NuGetGallery_download-count-patch,grenade/NuGetGallery_download-count-patch,skbkontur/NuGetGallery