Misc updates

This commit is contained in:
= 2019-09-04 21:08:57 -05:00
parent 25ef7b5675
commit f000e564f9
Signed by: kiichan
GPG key ID: 619DFD67F0976616
10 changed files with 183 additions and 27 deletions

View file

@ -1,5 +1,16 @@
(function() {
var get_next_url = function() {
// A Next defined in the URL has priority
var urlparam = document.URL.match(/next=([^&#]+)/)
if (urlparam.length == 2) {
return urlparam[1]
}
// Next highest priority is a defined SQRL_NEXT
if (typeof SQRL_NEXT !== "undefined") {
return SQRL_NEXT
}
// Lowest priority is the first input element
// named "next", otherwise return null
var input = document.querySelectorAll('input[name="next"]');
return input.length > 0 ? input[0].value : null;
},