-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.html
65 lines (59 loc) · 1.4 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
<html>
<head>
<style type="text/css">
body {
font-family: helvetica, arial, sans-serif;
font-size: 12px;
}
#settings {
margin-top: 18px;
font-weight: bold;
font-size: 14px;
margin-bottom: 10px;
}
#toRememberChkBox {
float: left;
}
#toRemember {
padding-top: 2px;
}
#saveBtn {
margin-top: 15px;
clear: left;
}
#saved {
margin-top: 5px;
display: none;
}
</style>
<script type="text/javascript" src="jquery-1.4.1.min.js"></script>
<script type="text/javascript">
var bg = chrome.extension.getBackgroundPage();
/**
* Saves settings.
*/
function saveSettings() {
bg.saveSettings({"toRememberLastSearch": ($("#toRememberChkBox").attr("checked") ? "1" : "0")});
}
$(document).ready(function() {
$("#toRememberChkBox").click(function() {
$("#saved").hide();
});
$("#saveBtn input").click(function() {
$("#saved").hide();
saveSettings();
$("#saved").fadeIn("slow");
});
$("#toRememberChkBox").attr("checked", bg.toRememberLastSearch);
});
</script>
</head>
<body>
<div id="logo"><img src="logo.gif"/></div>
<div id="settings">User settings:</div>
<input type="checkbox" id="toRememberChkBox"/>
<div id="toRemember">Remember last search</div>
<div id="saveBtn"><input type="button" value="Save"/></div>
<div id="saved">Setting saved</div>
</body>
</html>