Merge branch 'master' into ft/oas3-tio

This commit is contained in:
Kyle
2017-09-08 18:50:14 -07:00
committed by GitHub
3 changed files with 11 additions and 3 deletions

View File

@@ -25,7 +25,7 @@ or anything that violates the specifications.
| Which Swagger/OpenAPI version? | | Which Swagger/OpenAPI version? |
| Which Swagger-UI version? | | Which Swagger-UI version? |
| How did you install Swagger-UI? | | How did you install Swagger-UI? |
| Which broswer & version? | | Which browser & version? |
| Which operating system? | | Which operating system? |

View File

@@ -11,7 +11,11 @@
var redirectUrl = oauth2.redirectUrl; var redirectUrl = oauth2.redirectUrl;
var isValid, qp, arr; var isValid, qp, arr;
qp = (window.location.hash || location.search).substring(1); if (/code|token|error/.test(window.location.hash)) {
qp = window.location.hash.substring(1);
} else {
qp = location.search.substring(1);
}
arr = qp.split("&") arr = qp.split("&")
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';}) arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';})

View File

@@ -11,7 +11,11 @@
var redirectUrl = oauth2.redirectUrl; var redirectUrl = oauth2.redirectUrl;
var isValid, qp, arr; var isValid, qp, arr;
qp = (window.location.hash || location.search).substring(1); if (/code|token|error/.test(window.location.hash)) {
qp = window.location.hash.substring(1);
} else {
qp = location.search.substring(1);
}
arr = qp.split("&") arr = qp.split("&")
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';}) arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';})