forked from nsand/tab-glutton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.html
91 lines (87 loc) · 2.12 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
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body {
font-family: Helvetica, Arial, sans-serif;
}
ul {
list-style-type: none;
margin: 0;
}
.disabled {
color: #cfcfcf;
}
.options {
border: 2px solid black;
width: 275px;
-webkit-border-top-left-radius: 15px;
-webkit-border-top-right-radius: 15px;
-webkit-border-bottom-left-radius: 15px;
-webkit-border-bottom-right-radius: 15px;
}
h1,h2,h3,h4,h5 {
margin: 0;
}
h1.header {
margin-bottom: 10px;
}
.options h2 {
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #ebeff9), color-stop(1.0, #fff));
padding: 2px 0 4px 10px;
-webkit-border-top-left-radius: 15px;
-webkit-border-top-right-radius: 15px;
}
.options > ul {
padding: 0;
}
</style>
<script type="text/javascript" src="lib/jquery.js"></script>
<script type="text/javascript">
$(function() {
var show = localStorage["showURL"];
var hover = localStorage["hoverURL"];
if (show == "true") {
$("#showURL").attr("checked", "checked");
}
else {
$("#hoverURL").attr("disabled", "disabled").next().addClass("disabled");
}
if (hover == "true") {
$("#hoverURL").attr("checked", "checked");
}
$("#showURL").change(function() {
var checked = $(this).is(":checked");
toggleOption($("#hoverURL"), checked);
localStorage["showURL"] = checked;
});
$("#hoverURL").change(function() {
localStorage["hoverURL"] = $(this).is(":checked");
});
});
function toggleOption(option, enabled) {
if (enabled) {
option.removeAttr("disabled").next().removeClass("disabled");
}
else {
option.attr("disabled", "disabled").next().addClass("disabled");
}
}
</script>
<title>Tab Glutton Settings</title>
</head>
<body>
<h1 class="header"><img src="tab_glutton_48.png">Tab Glutton Options</h1>
<div class="options">
<h2>Display</h2>
<ul>
<li>
<input type="checkbox" id="showURL"><label for="showURL">Show tab URL</label>
<ul>
<li><input type="checkbox" id="hoverURL"><label for="hoverURL">On hover</label></li>
</ul>
</li>
</ul>
</div>
</body>
</html>