Keep URL parameters, and try to get the thing still work, for issue #1418
Fix JavaScript code to cope with URL parameters
add a test for urls with params
Merge pull request #1422 from pculture/gh-1418

Gh 1418