Misc updates
This commit is contained in:
parent
25ef7b5675
commit
f000e564f9
10 changed files with 183 additions and 27 deletions
|
@ -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;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue