(key)
| 21 | } |
| 22 | |
| 23 | function login_qs(key) { |
| 24 | /* eslint-disable-next-line no-useless-escape */ |
| 25 | key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, "\\$&"); // escape RegEx meta chars |
| 26 | var match = location.search.match(new RegExp("[?&]" + key + "=([^&]+)(&|$)")); |
| 27 | if (match == null) { |
| 28 | return ("/"); |
| 29 | } |
| 30 | return match && decodeURIComponent(match[1].replace(/\+/g, " ")); |
| 31 | } |
| 32 | |
| 33 | function doLogin() { |
| 34 | window.document.location = "/auth/login?returnPath=" + login_qs("returnPath"); |