-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathoptions.html
81 lines (77 loc) · 2.66 KB
/
options.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>chromBank opcje</title>
<script type="text/javascript">
function loadOptions() {
if(localStorage.customer){
document.getElementById("customer").value = localStorage.customer;
}
if(localStorage.password){
document.getElementById("password").value = localStorage.password;
}
}
function saveOptions() {
localStorage.customer = document.getElementById("customer").value;
localStorage.password = document.getElementById("password").value;
document.getElementById('msg').textContent = 'Zapisano!';
if(window.location.hash == '#popup'){
window.location = 'popup.html';
}else{
// window.close();
}
}
function cancel() {
}
</script>
<style type="text/css">
body {
font-family: Arial;
}
#main {
margin: 0 auto;
width: 300px;
text-align: center;
}
#main input{
width: 200px;
font-size: 20px;
}
#form-box {
/* border: 1px solid #000;*/
}
label {
display: block;
width: 230px;
clear: both;
}
label input {
float: right
}
#studio {
padding: 20px;
background: url('img/favicon.png') no-repeat;
}
h1 {
background: url('img/48.png') no-repeat;
padding-left: 0px;
height: 50px;
}
</style>
</head>
<body onload="loadOptions()">
<div id="main">
<h1>chromBank</h1>
<div id="msg">Dane zostaną zapamiętane<br/> tylko na tym komputerze</div>
<div id="form-box">
<form id="form" action="" onsubmit="saveOptions();return false;">
<input type="text" name="customer" id="customer" placeholder="Login" /><br/>
<input type="password" name="password" id="password" placeholder="Hasło" /><br/>
<button>Zachowaj</button>
</form>
<!-- <button onclick="cancel();">Przywróć</button><br />-->
</div>
</div>
</body>
</html>