Correct location object access
Merge pull request #3 from aurhe/fix-document-location

Get document origin using document.location instead of window.location