angularjs' $location lacks an origin so using $window.location now
Merge branch 'master' into gh-pages