2.0 Update

pull/2/head 2.0
Guus van Meerveld 4 years ago
parent f98c177a62
commit 0c6c6a4893

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020 Guus van Meerveld
Copyright (c) 2020 Guus van Meerveld & Martijn Oosterhuis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

@ -1,3 +1,5 @@
<p align="center"><img src="icons/banner.png" width="400"></p>
# Magister Auto-Login
Automagically logs into Magister 6 so you won't have to.

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

@ -7,17 +7,19 @@ var snooze = ms => new Promise(res => setTimeout(res, ms));
function login() {
chrome.storage.sync.get(['school','number', 'password'], async function (result) {
await waitForSel("#scholenkiezer_value");
if (d("scholenkiezer_value") && result.number) {
d("scholenkiezer_value").value = result.school;
d("scholenkiezer_value").dispatchEvent(new Event("input"));
};
await waitForSel(".selected");
if (q(".selected")) {
q(".selected").click();
if (d("scholenkiezer_value")) {
await waitForSel("#scholenkiezer_value");
if (d("scholenkiezer_value") && result.number) {
d("scholenkiezer_value").value = result.school;
d("scholenkiezer_value").dispatchEvent(new Event("input"));
};
await waitForSel(".selected");
if (q(".selected")) {
q(".selected").click();
}
}
await waitForSel("#username");

@ -32,9 +32,9 @@ function save() {
"password": password
});
d("save").innerHTML = "Saved!"
d("save").innerHTML = "Opgeslagen!"
} catch (e) {
d("save").innerHTML = "Error"
d("save").innerHTML = "Fout"
d("save").className = "btn btn-danger float-right"
}
};
@ -62,7 +62,7 @@ function onLoad() {
chrome.storage.sync.get(['darkmode'], function (result) {
d("dark-mode").checked = result.darkmode
d("dark-link").disabled = d("dark-mode").checked ? false : true
d("dark-link").disabled = !d("dark-mode").checked
});
d("switch").addEventListener("click", toggle)
@ -84,10 +84,8 @@ function darkMode() {
chrome.storage.sync.set({
"darkmode": d("dark-mode").checked
});
console.log(!d("dark-mode").checked);
d("dark-link").disabled = d("dark-mode").checked ? false : true
d("dark-link").disabled = !d("dark-mode").checked
}

@ -1,6 +1,6 @@
{
"name": "Magister Auto-Login",
"version": "1.1",
"version": "2.0",
"manifest_version": 2,
"description": "Auto-Login for Magister 6 webapp.",
"options_page": "options/index.html",

@ -26,21 +26,21 @@
<div class="row">
<div class="col">
<label for="">School:</label>
<input type="text" class="form-control mb-3 login" autofocus name="school" id="school" placeholder="Enter school">
<input type="text" class="form-control mb-3 login" autofocus name="school" id="school" placeholder="Vul je school in">
<hr class="bg-light mb-3">
<label for="">Username:</label>
<label for="">Stamnummer</label>:</label>
<input type="text" class="form-control mb-3 login" autofocus name="number" id="number"
placeholder="Enter username">
placeholder="Vul je stamnummer in">
<hr class="bg-light mb-3">
<label for="">Password:</label>
<label for="">Wachtwoord:</label>
<input type="password" class="form-control mb-3 login" name="password" id="password"
placeholder="Enter password">
placeholder="Vul je wachtwoord in">
<hr class="bg-light mb-3">
<button class="btn-primary btn float-right" id="save">Save</button>
<button class="btn-primary btn float-right" id="save">Opslaan</button>
</div>
</div>
</div>
<p class="copyright" title="Kleine credit naar Sam Taen">By Martijn Oosterhuis & Guus van Meerveld</p>
<p class="copyright" title="Kleine credit naar Sam Taen">Door Martijn Oosterhuis & Guus van Meerveld</p>
</div>

@ -17,17 +17,18 @@
<div class="row">
<div class="col">
<label for="">School:</label>
<input type="text" class="form-control mb-3 login" autofocus name="school" id="school" placeholder="Enter school">
<input type="text" class="form-control mb-3 login" autofocus name="school" id="school"
placeholder="Vul je school in">
<hr class="bg-light mb-3">
<label for="">Username:</label>
<label for="">Stamnummer</label>:</label>
<input type="text" class="form-control mb-3 login" autofocus name="number" id="number"
placeholder="Enter username">
placeholder="Vul je stamnummer in">
<hr class="bg-light mb-3">
<label for="">Password:</label>
<label for="">Wachtwoord:</label>
<input type="password" class="form-control mb-3 login" name="password" id="password"
placeholder="Enter password">
placeholder="Vul je wachtwoord in">
<hr class="bg-light mb-3">
<button class="btn-primary btn float-right" id="save">Save</button>
<button class="btn-primary btn float-right" id="save">Opslaan</button>
<div class="material-switch pull-right enable">
<input id="switch" type="checkbox">
<label for="switch" class="label-primary"></label>

Loading…
Cancel
Save