mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-12 04:52:26 +01:00
Revert redundant changes to static js
This commit is contained in:
parent
a4daa899ec
commit
0ade403f55
1 changed files with 2 additions and 4 deletions
|
@ -56,7 +56,6 @@ var show_login = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (matrixLogin.serverAcceptsSso) {
|
if (matrixLogin.serverAcceptsSso) {
|
||||||
$("#sso_form").attr("action", "/_matrix/client/r0/login/sso/redirect");
|
|
||||||
$("#sso_flow").show();
|
$("#sso_flow").show();
|
||||||
} else if (matrixLogin.serverAcceptsCas) {
|
} else if (matrixLogin.serverAcceptsCas) {
|
||||||
$("#sso_form").attr("action", "/_matrix/client/r0/login/cas/redirect");
|
$("#sso_form").attr("action", "/_matrix/client/r0/login/cas/redirect");
|
||||||
|
@ -80,7 +79,7 @@ var fetch_info = function(cb) {
|
||||||
$.get(matrixLogin.endpoint, function(response) {
|
$.get(matrixLogin.endpoint, function(response) {
|
||||||
var serverAcceptsPassword = false;
|
var serverAcceptsPassword = false;
|
||||||
var serverAcceptsCas = false;
|
var serverAcceptsCas = false;
|
||||||
for (var i = 0; i < response.flows.length; i++) {
|
for (var i=0; i<response.flows.length; i++) {
|
||||||
var flow = response.flows[i];
|
var flow = response.flows[i];
|
||||||
if ("m.login.cas" === flow.type) {
|
if ("m.login.cas" === flow.type) {
|
||||||
matrixLogin.serverAcceptsCas = true;
|
matrixLogin.serverAcceptsCas = true;
|
||||||
|
@ -122,7 +121,6 @@ matrixLogin.onLogin = function(response) {
|
||||||
// clobber this function
|
// clobber this function
|
||||||
console.log("onLogin - This function should be replaced to proceed.");
|
console.log("onLogin - This function should be replaced to proceed.");
|
||||||
console.log(response);
|
console.log(response);
|
||||||
alert("Login successful!");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var parseQsFromUrl = function(query) {
|
var parseQsFromUrl = function(query) {
|
||||||
|
@ -145,7 +143,7 @@ var try_token = function() {
|
||||||
if (pos == -1) {
|
if (pos == -1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var qs = parseQsFromUrl(window.location.href.substr(pos + 1));
|
var qs = parseQsFromUrl(window.location.href.substr(pos+1));
|
||||||
|
|
||||||
var loginToken = qs.loginToken;
|
var loginToken = qs.loginToken;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue