-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.html
44 lines (35 loc) · 1001 Bytes
/
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
<html>
<head><title>GitHub:Enterprise Notifier Options</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
// Saves options to localStorage.
function save_options() {
localStorage.githubHost = $("#githubHost").val();
$("#status").text("Options saved");
$("#status").show();
$("#status").fadeOut("slow");
}
// Restores select box state to saved value from localStorage.
function restore_options() {
$("#githubHost").val(localStorage.githubHost);
}
$(document).ready(function() {
$("#save").click(function() {
save_options();
return false;
});
restore_options();
});
</script>
</head>
<body>
<h1>GitHub:Enterprise Notifier</h1>
<form>
<p>
<label for="githubHost">Host name: </label>
<input type="text" name="githubHost" id="githubHost" placeholder="github.example.com" />
</p>
<button id="save">Save</button> <span id="status"></span>
</form>
</body>
</html>