better param parsing #36

Merged
coolaj86 merged 1 commits from params-parsing into master 2019-05-29 21:38:17 +00:00
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@
document.body.hidden = false; document.body.hidden = false;
var hash = window.location.hash.substr(1); var hash = window.location.hash.replace(/^[\/#?]+/, '');
Review

Would #? to be safe, but I think inside a square bracket it's fine.

Would \#\? to be safe, but I think inside a square bracket it's fine.
Review

true on both accounts

true on both accounts
var query = window.location.search; var query = window.location.search;
function parseQuery(search) { function parseQuery(search) {