Accounts for possible trailing slash in location.search
Merge pull request #8 from nifengle/url-search-bug

Accounts for possible trailing slash in location.search