summaryrefslogtreecommitdiff
path: root/js/index.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-05-07 17:21:16 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2016-08-15 20:01:27 +0200
commitea8a9b50f419f422c79433a214fe6d8412961ab6 (patch)
treebbf1464a12f34d6a7b06ff296d5f7f1149b23120 /js/index.js
parente094850c59279d98b2ae291dc125fbd9092ff1de (diff)
downloadwvs-vplan-ea8a9b50f419f422c79433a214fe6d8412961ab6.tar.gz
wvs-vplan-ea8a9b50f419f422c79433a214fe6d8412961ab6.zip
kleinere Änderungen
Diffstat (limited to 'js/index.js')
-rw-r--r--js/index.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/js/index.js b/js/index.js
index c586b71..09cfd3a 100644
--- a/js/index.js
+++ b/js/index.js
@@ -49,7 +49,7 @@ function updateCheck(){
loginOk = false;
}
- if(loginOk == true){
+ if(loginOk === true){
tryLogin(); // nur wenn alles in Ordnung ist, einloggen lassen
}
});
@@ -626,14 +626,12 @@ function loggedIn(resultHtml){
var link = $('.coursebox .info .coursename a:contains("Vertretungsplan")', resultHtml).attr('href');
if(link === undefined){
- return 0;
+ fail();
}
localStorage.setItem('overviewlink', link);
console.log('Eingeloggt');
getOverview(link, fail);
-
- return 1;
}
/* sendet einen HTTPost-Request mit Logindaten */
@@ -667,6 +665,7 @@ function getUserData(){
}
var password = encodeURIComponent($('#password').val());
+
if(password === ''){
password = localStorage.getItem('password');
}else{
@@ -676,9 +675,6 @@ function getUserData(){
console.log('Benutzerdaten geladen');
if(username !== null && username.length !== 0 && password !== null && password.length !== 0){
- $('#username').val(username);
- $('#password').val(password);
-
return [username, password];
}else{
return null;